]> git.baikalelectronics.ru Git - kernel.git/commit
rcu: Fix wrong check in list_splice_init_rcu()
authorJan H. Schönherr <schnhrr@cs.tu-berlin.de>
Tue, 19 Jul 2011 19:10:26 +0000 (21:10 +0200)
committerPaul E. McKenney <paulmck@linux.vnet.ibm.com>
Wed, 20 Jul 2011 21:10:20 +0000 (14:10 -0700)
commitbff28c2b4363f5fd7a01d1f9c4c45f7d207476bc
tree5ac9a61694116b0743b3f407ee935bb07e9271e2
parent9c79ab2e243e352ba17cfb7810cf688e01ac48f8
rcu: Fix wrong check in list_splice_init_rcu()

If the list to be spliced is empty, then list_splice_init_rcu() has
nothing to do.  Unfortunately, list_splice_init_rcu() does not check
the list to be spliced; it instead checks the list to be spliced into.
This results in memory leaks given current usage.  This commit
therefore fixes the empty-list check.

Signed-off-by: Jan H. Schönherr <schnhrr@cs.tu-berlin.de>
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
include/linux/rculist.h