]> git.baikalelectronics.ru Git - kernel.git/commit
netfilter: ctnetlink: fix soft lockup when netlink adds new entries
authorJozsef Kadlecsik <kadlec@blackhole.kfki.hu>
Tue, 21 Feb 2012 13:53:57 +0000 (14:53 +0100)
committerPablo Neira Ayuso <pablo@netfilter.org>
Tue, 21 Feb 2012 15:25:31 +0000 (16:25 +0100)
commitf5ac0708378815bb1c956678f4862146d1ddc020
tree1d40e186b7afbd0c7485dd95e1fb6c24174f4d5c
parent9da2b6437e5389c3f884b4404cea818cf002b681
netfilter: ctnetlink: fix soft lockup when netlink adds new entries

Marcell Zambo and Janos Farago noticed and reported that when
new conntrack entries are added via netlink and the conntrack table
gets full, soft lockup happens. This is because the nf_conntrack_lock
is held while nf_conntrack_alloc is called, which is in turn wants
to lock nf_conntrack_lock while evicting entries from the full table.

The patch fixes the soft lockup with limiting the holding of the
nf_conntrack_lock to the minimum, where it's absolutely required.

Signed-off-by: Jozsef Kadlecsik <kadlec@blackhole.kfki.hu>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
net/netfilter/nf_conntrack_netlink.c