Message ID | 20111010185246.15533bv1p3pmnba6@mail.your-server.de |
---|---|
State | Accepted, archived |
Delegated to: | David Miller |
Headers | show |
Le lundi 10 octobre 2011 à 18:52 +0200, danborkmann@iogearbox.net a écrit : > 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> Thanks -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
From: Eric Dumazet <eric.dumazet@gmail.com> Date: Mon, 10 Oct 2011 19:05:04 +0200 > Le lundi 10 octobre 2011 à 18:52 +0200, danborkmann@iogearbox.net a > écrit : >> 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> Applied, but please make patches like this against the net-next tree in which the af_packet.c code had changed quite a bit and therefore I had to munch your patch to get it to apply. -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/net/packet/af_packet.c b/net/packet/af_packet.c index fabb4fa..886ae50 100644 --- a/net/packet/af_packet.c +++ b/net/packet/af_packet.c @@ -1170,8 +1170,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);
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> --- net/packet/af_packet.c | 2 -- 1 files changed, 0 insertions(+), 2 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html