X-Git-Url: https://git.openpandora.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=mm%2Fksm.c;h=43bc893470b40512e26bdd129fb2194708bfbbdc;hb=cb600d2f83c854ec3d6660063e4466431999489b;hp=65ab5c7067d994ad934c4f4bd5fd5809235a0756;hpb=9ae21ca362679757786f5abe556c7943e9001426;p=pandora-kernel.git diff --git a/mm/ksm.c b/mm/ksm.c index 65ab5c7067d9..43bc893470b4 100644 --- a/mm/ksm.c +++ b/mm/ksm.c @@ -1724,8 +1724,13 @@ static int ksm_memory_callback(struct notifier_block *self, /* * Keep it very simple for now: just lock out ksmd and * MADV_UNMERGEABLE while any memory is going offline. + * mutex_lock_nested() is necessary because lockdep was alarmed + * that here we take ksm_thread_mutex inside notifier chain + * mutex, and later take notifier chain mutex inside + * ksm_thread_mutex to unlock it. But that's safe because both + * are inside mem_hotplug_mutex. */ - mutex_lock(&ksm_thread_mutex); + mutex_lock_nested(&ksm_thread_mutex, SINGLE_DEPTH_NESTING); break; case MEM_OFFLINE: