From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric Dumazet Subject: Re: [PATCH][net-next] net: tcp: remove BUG_ON from tcp_v4_err Date: Fri, 9 Nov 2018 09:12:29 -0800 Message-ID: References: <1541754291-8659-1-git-send-email-lirongqing@baidu.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit To: Li RongQing , netdev@vger.kernel.org Return-path: Received: from mail-pl1-f196.google.com ([209.85.214.196]:32880 "EHLO mail-pl1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727961AbeKJCyA (ORCPT ); Fri, 9 Nov 2018 21:54:00 -0500 Received: by mail-pl1-f196.google.com with SMTP id w22-v6so1225862plk.0 for ; Fri, 09 Nov 2018 09:12:32 -0800 (PST) In-Reply-To: <1541754291-8659-1-git-send-email-lirongqing@baidu.com> Content-Language: en-US Sender: netdev-owner@vger.kernel.org List-ID: On 11/09/2018 01:04 AM, Li RongQing wrote: > if skb is NULL pointer, and the following access of skb's > skb_mstamp_ns will trigger panic, which is same as BUG_ON > > Signed-off-by: Li RongQing > --- > net/ipv4/tcp_ipv4.c | 1 - > 1 file changed, 1 deletion(-) > > diff --git a/net/ipv4/tcp_ipv4.c b/net/ipv4/tcp_ipv4.c > index a336787d75e5..5424a4077c27 100644 > --- a/net/ipv4/tcp_ipv4.c > +++ b/net/ipv4/tcp_ipv4.c > @@ -542,7 +542,6 @@ int tcp_v4_err(struct sk_buff *icmp_skb, u32 info) > icsk->icsk_rto = inet_csk_rto_backoff(icsk, TCP_RTO_MAX); > > skb = tcp_rtx_queue_head(sk); > - BUG_ON(!skb); > > tcp_mstamp_refresh(tp); > delta_us = (u32)(tp->tcp_mstamp - tcp_skb_timestamp_us(skb)); > SGTM, thanks. Signed-off-by: Eric Dumazet