]> www.infradead.org Git - users/jedix/linux-maple.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)
committerMaxim Uvarov <maxim.uvarov@oracle.com>
Wed, 14 Nov 2012 16:24:37 +0000 (08:24 -0800)
commitcee67a47955ff34e859db37440a89422c5f4f27b
treeab3d4c4f9fd4cb414b75da7ec9879e2e31677024
parent8a4d2960b8f0860b5ebf31e60bd74d5d4749af1d
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>
(cherry picked from commit 7f70893173b056df691b2ee7546bb44fd9abae6a)
include/linux/rculist.h