Skip to content
Commit 9ada1934 authored by Shaohua Li's avatar Shaohua Li Committed by Pekka Enberg
Browse files

slub: move discard_slab out of node lock



Lockdep reports there is potential deadlock for slub node list_lock.
discard_slab() is called with the lock hold in unfreeze_partials(),
which could trigger a slab allocation, which could hold the lock again.

discard_slab() doesn't need hold the lock actually, if the slab is
already removed from partial list.

Acked-by: default avatarChristoph Lameter <cl@linux.com>
Reported-and-tested-by: default avatarYong Zhang <yong.zhang0@gmail.com>
Reported-and-tested-by: default avatarJulie Sullivan <kernelmail.jms@gmail.com>
Signed-off-by: default avatarShaohua Li <shaohua.li@intel.com>
Signed-off-by: default avatarPekka Enberg <penberg@kernel.org>
parent f64ae042
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment