]> git.karo-electronics.de Git - karo-tx-linux.git/commit
ulog: fix panic on SMP kernels
authorMark Huang <mlhuang@cs.princeton.edu>
Sat, 26 Aug 2006 15:35:49 +0000 (17:35 +0200)
committerAdrian Bunk <bunk@stusta.de>
Sat, 26 Aug 2006 15:35:49 +0000 (17:35 +0200)
commit189abe08c84ab16197c29683d40df3c4917bd475
tree92b784587e3313eadcfcc8cdf987e526cc8b72c1
parentfbb8b6ef114c7c298a6e20bf271c7b16978d0a70
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: Adrian Bunk <bunk@stusta.de>
net/bridge/netfilter/ebt_ulog.c
net/ipv4/netfilter/ipt_ULOG.c
net/netfilter/nfnetlink_log.c