original_kernel/net
danborkmann@iogearbox.net 7f5c3e3a80 af_packet: remove BUG statement in tpacket_destruct_skb
Here's a quote of the comment about the BUG macro from asm-generic/bug.h:

 Don't use BUG() or BUG_ON() unless there's really no way out; one
 example might be detecting data structure corruption in the middle
 of an operation that can't be backed out of.  If the (sub)system
 can somehow continue operating, perhaps with reduced functionality,
 it's probably not BUG-worthy.

 If you're tempted to BUG(), think again:  is completely giving up
 really the *only* solution?  There are usually better options, where
 users don't need to reboot ASAP and can mostly shut down cleanly.

In our case, the status flag of a ring buffer slot is managed from both sides,
the kernel space and the user space. This means that even though the kernel
side might work as expected, the user space screws up and changes this flag
right between the send(2) is triggered when the flag is changed to
TP_STATUS_SENDING and a given skb is destructed after some time. Then, this
will hit the BUG macro. As David suggested, the best solution is to simply
remove this statement since it cannot be used for kernel side internal
consistency checks. I've tested it and the system still behaves /stable/ in
this case, so in accordance with the above comment, we should rather remove it.

Signed-off-by: Daniel Borkmann <daniel.borkmann@tik.ee.ethz.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
2012-08-12 13:42:17 -07:00
..
9p
802
8021q
appletalk
atm
ax25
batman-adv batman-adv: Fix mem leak in the batadv_tt_local_event() function 2012-08-08 16:04:04 -07:00
bluetooth
bridge
caif
can
ceph libceph: fix crypto key null deref, memory leak 2012-08-02 09:19:20 -07:00
core net/core: Fix potential memory leak in dev_set_alias() 2012-08-08 16:06:23 -07:00
dcb
dccp
decnet
dns_resolver
dsa
ethernet
ieee802154
ipv4 ipv4: fix ip_send_skb() 2012-08-10 14:08:57 -07:00
ipv6 net: tcp: ipv6_mapped needs sk_rx_dst_set method 2012-08-09 20:56:09 -07:00
ipx
irda
iucv
key
l2tp
lapb
llc llc: free the right skb 2012-08-06 13:30:01 -07:00
mac80211 Merge branch 'for-john' of git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211 2012-08-02 13:49:38 -04:00
mac802154
netfilter
netlabel
netlink
netrom
nfc
openvswitch
packet af_packet: remove BUG statement in tpacket_destruct_skb 2012-08-12 13:42:17 -07:00
phonet
rds
rfkill
rose
rxrpc
sched sched: add missing group change to qfq_change_class 2012-08-08 16:02:05 -07:00
sctp
sunrpc
tipc
unix
wanrouter
wimax
wireless cfg80211: process pending events when unregistering net device 2012-08-06 14:29:58 -04:00
x25
xfrm Fix unexpected SA hard expiration after changing date 2012-08-02 00:19:17 -07:00
Kconfig
Makefile
compat.c
nonet.c
socket.c
sysctl_net.c