]> git.baikalelectronics.ru Git - kernel.git/commit
mm/slub.c: list_lock may not be held in some circumstances
authorDavid Rientjes <rientjes@google.com>
Mon, 10 Feb 2014 22:25:39 +0000 (14:25 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Tue, 11 Feb 2014 00:01:41 +0000 (16:01 -0800)
commit2afec5eed96b34384b2b8f7bcbb3b3ffe6963693
tree8ade02c6988352329f52b961d776623f363cab7c
parent7b4124cd8f4ac3935ce149a08bd7a6ab666e1054
mm/slub.c: list_lock may not be held in some circumstances

Commit da91d35fc739 ("slub: use lockdep_assert_held") incorrectly
required that add_full() and remove_full() hold n->list_lock.  The lock
is only taken when kmem_cache_debug(s), since that's the only time it
actually does anything.

Require that the lock only be taken under such a condition.

Reported-by: Larry Finger <Larry.Finger@lwfinger.net>
Tested-by: Larry Finger <Larry.Finger@lwfinger.net>
Tested-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Acked-by: Christoph Lameter <cl@linux.com>
Cc: Pekka Enberg <penberg@kernel.org>
Signed-off-by: David Rientjes <rientjes@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
mm/slub.c