]> git.baikalelectronics.ru Git - kernel.git/commit
netfilter: nf_iterate: fix incorrect RCU usage
authorPatrick McHardy <kaber@trash.net>
Mon, 14 Feb 2011 16:35:07 +0000 (17:35 +0100)
committerPatrick McHardy <kaber@trash.net>
Mon, 14 Feb 2011 16:35:07 +0000 (17:35 +0100)
commitf11af77c8a880442691047d6878a56b6d6fb98cc
tree73b45541d33e86600cd10e4be43298864f2b6a1a
parentfb18ef1f72f5ae0f467b7b756de159c4a2d3c104
netfilter: nf_iterate: fix incorrect RCU usage

As noticed by Eric, nf_iterate doesn't use RCU correctly by
accessing the prev pointer of a RCU protected list element when
a verdict of NF_REPEAT is issued.

Fix by jumping backwards to the hook invocation directly instead
of loading the previous list element before continuing the list
iteration.

Reported-by: Eric Dumazet <eric.dumazet@gmail.com>
Acked-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: Patrick McHardy <kaber@trash.net>
net/netfilter/core.c