]> git.baikalelectronics.ru Git - kernel.git/commit
netfilter: nf_log: release skbuff on nlmsg put failure
authorHoucheng Lin <houcheng@gmail.com>
Thu, 23 Oct 2014 08:36:08 +0000 (10:36 +0200)
committerPablo Neira Ayuso <pablo@netfilter.org>
Fri, 24 Oct 2014 12:34:11 +0000 (14:34 +0200)
commit95069ee2b1f89c4f64527d6b1e9af3c24e24ebe1
treeefd04d22d960f11ee69c9d57807850e48c4515af
parentfbf61fc9c092d47e782beabbba898aa01f1a632a
netfilter: nf_log: release skbuff on nlmsg put failure

The kernel should reserve enough room in the skb so that the DONE
message can always be appended.  However, in case of e.g. new attribute
erronously not being size-accounted for, __nfulnl_send() will still
try to put next nlmsg into this full skbuf, causing the skb to be stuck
forever and blocking delivery of further messages.

Fix issue by releasing skb immediately after nlmsg_put error and
WARN() so we can track down the cause of such size mismatch.

[ fw@strlen.de: add tailroom/len info to WARN ]

Signed-off-by: Houcheng Lin <houcheng@gmail.com>
Signed-off-by: Florian Westphal <fw@strlen.de>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
net/netfilter/nfnetlink_log.c