mirror of
https://github.com/opnsense/src.git
synced 2026-06-09 08:43:19 -04:00
Remove Giant around allocation of the swap pager with non-NULL handle.
Existing issue of not protecting pager_object_list iteration in vm_pager_object_lookup() by sw_alloc_mtx is not affected by Giant removal. Reviewed by: alc Sponsored by: The FreeBSD Foundation
This commit is contained in:
parent
8636496407
commit
9a2047083f
1 changed files with 0 additions and 3 deletions
|
|
@ -604,7 +604,6 @@ swap_pager_alloc(void *handle, vm_ooffset_t size, vm_prot_t prot,
|
|||
|
||||
pindex = OFF_TO_IDX(offset + PAGE_MASK + size);
|
||||
if (handle) {
|
||||
mtx_lock(&Giant);
|
||||
/*
|
||||
* Reference existing named region or allocate new one. There
|
||||
* should not be a race here against swp_pager_meta_build()
|
||||
|
|
@ -617,7 +616,6 @@ swap_pager_alloc(void *handle, vm_ooffset_t size, vm_prot_t prot,
|
|||
if (cred != NULL) {
|
||||
if (!swap_reserve_by_cred(size, cred)) {
|
||||
sx_xunlock(&sw_alloc_sx);
|
||||
mtx_unlock(&Giant);
|
||||
return (NULL);
|
||||
}
|
||||
crhold(cred);
|
||||
|
|
@ -633,7 +631,6 @@ swap_pager_alloc(void *handle, vm_ooffset_t size, vm_prot_t prot,
|
|||
VM_OBJECT_WUNLOCK(object);
|
||||
}
|
||||
sx_xunlock(&sw_alloc_sx);
|
||||
mtx_unlock(&Giant);
|
||||
} else {
|
||||
if (cred != NULL) {
|
||||
if (!swap_reserve_by_cred(size, cred))
|
||||
|
|
|
|||
Loading…
Reference in a new issue