]> git.baikalelectronics.ru Git - kernel.git/commit
netfilter: ctnetlink: fix missing refcount increment during dumps
authorPablo Neira Ayuso <pablo@netfilter.org>
Mon, 24 Jan 2011 18:01:07 +0000 (19:01 +0100)
committerPatrick McHardy <kaber@trash.net>
Mon, 24 Jan 2011 18:01:07 +0000 (19:01 +0100)
commita6584f47db272ff27ce7c80c1dd059f5d270764a
treea80b6b3cfe4d3a9ea74316ec5a2d68a66ca67ddc
parent8454788220a190af69f4968a817df4f15b3f75b3
netfilter: ctnetlink: fix missing refcount increment during dumps

In 8be3a14 netfilter: fix race in conntrack between dump_table and
destroy, we recovered spinlocks to protect the dump of the conntrack
table according to reports from Stephen and acknowledgments on the
issue from Eric.

In that patch, the refcount bump that allows to keep a reference
to the current ct object was removed. However, we still decrement
the refcount for that object in the output path of
ctnetlink_dump_table():

        if (last)
                nf_ct_put(last)

Cc: Stephen Hemminger <stephen.hemminger@vyatta.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Acked-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: Patrick McHardy <kaber@trash.net>
net/netfilter/nf_conntrack_netlink.c