diff options
author | danborkmann@iogearbox.net <danborkmann@iogearbox.net> | 2011-10-10 02:52:46 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-10-10 14:09:08 -0400 |
commit | 95f5f803b3897f622c4b5f72d554874faf74df12 (patch) | |
tree | 7241563ed75f0ee7443df99bbbb304c0a870496a /net/packet | |
parent | 5bdc4f5de1345c221f5b51d73fafe3e5de718a54 (diff) |
af_packet: remove unnecessary BUG_ON() in tpacket_destruct_skb
If skb is NULL, then stack trace is thrown anyway on dereference.
Therefore, the stack trace triggered by BUG_ON is duplicate.
Signed-off-by: Daniel Borkmann <danborkmann@googlemail.com>
Cc: Eric Dumazet <eric.dumazet@gmail.com>
Acked-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/packet')
-rw-r--r-- | net/packet/af_packet.c | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/net/packet/af_packet.c b/net/packet/af_packet.c index dac91abf4c0..7b5f0325301 100644 --- a/net/packet/af_packet.c +++ b/net/packet/af_packet.c | |||
@@ -1968,8 +1968,6 @@ static void tpacket_destruct_skb(struct sk_buff *skb) | |||
1968 | struct packet_sock *po = pkt_sk(skb->sk); | 1968 | struct packet_sock *po = pkt_sk(skb->sk); |
1969 | void *ph; | 1969 | void *ph; |
1970 | 1970 | ||
1971 | BUG_ON(skb == NULL); | ||
1972 | |||
1973 | if (likely(po->tx_ring.pg_vec)) { | 1971 | if (likely(po->tx_ring.pg_vec)) { |
1974 | ph = skb_shinfo(skb)->destructor_arg; | 1972 | ph = skb_shinfo(skb)->destructor_arg; |
1975 | BUG_ON(__packet_get_status(po, ph) != TP_STATUS_SENDING); | 1973 | BUG_ON(__packet_get_status(po, ph) != TP_STATUS_SENDING); |