ulog: fix panic on SMP kernels
authorMark Huang <mlhuang@cs.princeton.edu>
Sat, 12 Aug 2006 00:45:44 +0000 (02:45 +0200)
committerGreg Kroah-Hartman <gregkh@suse.de>
Wed, 23 Aug 2006 21:13:31 +0000 (14:13 -0700)
commitbb417c4bad96b07f075b98f874fb28cf258f8065
tree3a45d817b08b4c8b05eb446db8ce7cf8945b2ef4
parentf60aad27513c78d0c0e5feaeb1013f8ce6c07a7c
ulog: fix panic on SMP kernels

[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: Greg Kroah-Hartman <gregkh@suse.de>
net/bridge/netfilter/ebt_ulog.c
net/ipv4/netfilter/ipt_ULOG.c
net/netfilter/nfnetlink_log.c