summaryrefslogtreecommitdiffstats
path: root/net/netlink/diag.c
diff options
context:
space:
mode:
authorAndrey Vagin <avagin@openvz.org>2016-09-07 06:31:17 +0200
committerDavid S. Miller <davem@davemloft.net>2016-09-08 02:29:38 +0200
commit733ade23de1b72c1f11c5e4a1a9020a6f48decd2 (patch)
treee0f0cf62857c34cadc995ed7846bd78c22e1b40f /net/netlink/diag.c
parentMerge tag 'rxrpc-rewrite-20160907-2' of git://git.kernel.org/pub/scm/linux/ke... (diff)
downloadlinux-733ade23de1b72c1f11c5e4a1a9020a6f48decd2.tar.xz
linux-733ade23de1b72c1f11c5e4a1a9020a6f48decd2.zip
netlink: don't forget to release a rhashtable_iter structure
This bug was detected by kmemleak: unreferenced object 0xffff8804269cc3c0 (size 64): comm "criu", pid 1042, jiffies 4294907360 (age 13.713s) hex dump (first 32 bytes): a0 32 cc 2c 04 88 ff ff 00 00 00 00 00 00 00 00 .2.,............ 00 01 00 00 00 00 ad de 00 02 00 00 00 00 ad de ................ backtrace: [<ffffffff8184dffa>] kmemleak_alloc+0x4a/0xa0 [<ffffffff8124720f>] kmem_cache_alloc_trace+0x10f/0x280 [<ffffffffa02864cc>] __netlink_diag_dump+0x26c/0x290 [netlink_diag] v2: don't remove a reference on a rhashtable_iter structure to release it from netlink_diag_dump_done Cc: Herbert Xu <herbert@gondor.apana.org.au> Fixes: ad202074320c ("netlink: Use rhashtable walk interface in diag dump") Signed-off-by: Andrei Vagin <avagin@openvz.org> Acked-by: Herbert Xu <herbert@gondor.apana.org.au> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/netlink/diag.c')
-rw-r--r--net/netlink/diag.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/net/netlink/diag.c b/net/netlink/diag.c
index 3e3e2534478a..b2f0e986a6f4 100644
--- a/net/netlink/diag.c
+++ b/net/netlink/diag.c
@@ -127,7 +127,6 @@ stop:
goto done;
rhashtable_walk_exit(hti);
- cb->args[2] = 0;
num++;
mc_list: