]> git.baikalelectronics.ru Git - kernel.git/commit
[NETFILTER]: ulog: fix panic on SMP kernels
authorMark Huang <mlhuang@cs.princeton.edu>
Mon, 14 Aug 2006 01:57:54 +0000 (18:57 -0700)
committerDavid S. Miller <davem@davemloft.net>
Mon, 14 Aug 2006 01:57:54 +0000 (18:57 -0700)
commit310934098b81d11c5abe130fc8dbe96a5ddc91ce
tree73e600aa19051981a566ad55ca5fa6f9acec4f7a
parente696847d9e913f6333d6402980724d472d75e41a
[NETFILTER]: ulog: fix panic on SMP kernels

Fix kernel panic on various SMP machines. The culprit is a null
ub->skb in ulog_send(). If ulog_timer() has already been scheduled on
one CPU and is spinning on the lock, and ipt_ulog_packet() flushes the
queue on another CPU by calling ulog_send() right before it exits,
there will be no skbuff when ulog_timer() acquires the lock and calls
ulog_send(). Cancelling the timer in ulog_send() doesn't help because
it has already been scheduled and is running on the first CPU.

Similar problem exists in ebt_ulog.c and nfnetlink_log.c.

Signed-off-by: Mark Huang <mlhuang@cs.princeton.edu>
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/bridge/netfilter/ebt_ulog.c
net/ipv4/netfilter/ipt_ULOG.c
net/netfilter/nfnetlink_log.c