mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2024-12-26 03:09:34 +03:00
Fix invalid context bug
In the module unload path the vm_file_cache was being destroyed under a spin lock. Because this operation might sleep it was possible, although very very unlikely, that this could result in a deadlock. This issue was indentified by using a Linux debug kernel and has been fixed by moving the kmem_cache_destroy() out from under the spin lock. There is no need to lock this operation here. Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov> Closes zfsonlinux/zfs#771
This commit is contained in:
parent
93b0dc92ea
commit
2371321e8a
@ -845,13 +845,12 @@ spl_vn_fini(void)
|
||||
leaked++;
|
||||
}
|
||||
|
||||
kmem_cache_destroy(vn_file_cache);
|
||||
vn_file_cache = NULL;
|
||||
spin_unlock(&vn_file_lock);
|
||||
|
||||
if (leaked > 0)
|
||||
SWARN("Warning %d files leaked\n", leaked);
|
||||
|
||||
kmem_cache_destroy(vn_file_cache);
|
||||
kmem_cache_destroy(vn_cache);
|
||||
|
||||
SEXIT;
|
||||
|
Loading…
Reference in New Issue
Block a user