af_packet: remove unnecessary BUG_ON() in tpacket_destruct_skb
authordanborkmann@iogearbox.net <danborkmann@iogearbox.net>
Mon, 10 Oct 2011 06:52:46 +0000 (06:52 +0000)
committerDavid S. Miller <davem@davemloft.net>
Mon, 10 Oct 2011 18:09:08 +0000 (14:09 -0400)
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>
net/packet/af_packet.c

index dac91abf4c0fb4eda133c658b2cc019ee8d24c09..7b5f03253016cc49d4ad4958370314038a3ebad9 100644 (file)
@@ -1968,8 +1968,6 @@ static void tpacket_destruct_skb(struct sk_buff *skb)
        struct packet_sock *po = pkt_sk(skb->sk);
        void *ph;
 
-       BUG_ON(skb == NULL);
-
        if (likely(po->tx_ring.pg_vec)) {
                ph = skb_shinfo(skb)->destructor_arg;
                BUG_ON(__packet_get_status(po, ph) != TP_STATUS_SENDING);