Message ID | 20111010100203.15066m7nvqod58cb@webmail.your-server.de |
---|---|
State | Superseded, archived |
Delegated to: | David Miller |
Headers | show |
Le lundi 10 octobre 2011 à 10:02 +0200, danborkmann@iogearbox.net a écrit : > Thanks, you're absolutely right! Here's the trivial patch: > > af_packet: removed unnecessary BUG_ON assertion in tpacket_destruct_skb > OK but a proper title should be [PATCH] af_packet: remove unnecessary BUG_ON() in tpacket_destruct_skb > If skb is NULL, then stack trace is thrown on anyway on dereference. > Therefore, > the stack trace triggered by BUG_ON is duplicate. > > Signed-off-by: Daniel Borkmann <danborkmann@googlemail.com> > missing "---" separator > 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); > > Please send a complete new mail without any history. -- 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);