From ed9c6570aa746bdfc4e006e3fdd25b69f04cd6a2 Mon Sep 17 00:00:00 2001 From: Jozsef Kadlecsik Date: Wed, 31 Aug 2011 12:32:55 +0200 Subject: Dumping error triggered removing references twice and lead to kernel BUG If there was a dumping error in the middle, the set-specific variable was not zeroed out and thus the 'done' function of the dumping wrongly tried to release the already released reference of the set. The already released reference was caught by __ip_set_put and triggered a kernel BUG message. The issue was reported by Jean-Philippe Menil. --- kernel/net/netfilter/ipset/ip_set_core.c | 1 + 1 file changed, 1 insertion(+) diff --git a/kernel/net/netfilter/ipset/ip_set_core.c b/kernel/net/netfilter/ipset/ip_set_core.c index b5d380c..c3eabfd 100644 --- a/kernel/net/netfilter/ipset/ip_set_core.c +++ b/kernel/net/netfilter/ipset/ip_set_core.c @@ -1148,6 +1148,7 @@ release_refcount: if (ret || !cb->args[2]) { pr_debug("release set %s\n", ip_set_list[index]->name); ip_set_put_byindex(index); + cb->args[2] = 0; } out: if (nlh) { -- cgit v1.2.3