Netdev List
 help / color / mirror / Atom feed
From: Eric Dumazet <eric.dumazet@gmail.com>
To: soukjin.bae@samsung.com,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>
Cc: 박종언 <jongeon.park@samsung.com>, "Yuchung Cheng" <ycheng@google.com>
Subject: Re: (2) [Bug reporting] kernel panic during handle the dst unreach icmp msg.
Date: Thu, 14 Feb 2019 17:30:29 -0800	[thread overview]
Message-ID: <ef47d25c-a37e-8259-ce01-14a8e4c1cd9a@gmail.com> (raw)
In-Reply-To: <4989ee5d-0de3-b7a7-494d-f0c133dfc465@gmail.com>



On 02/14/2019 05:08 PM, Eric Dumazet wrote:
> 
> 
> On 02/14/2019 03:54 PM, 배석진 wrote:
>>> I do not believe this patch is needed.
>>>  
>>> You probably hit another more serious bug, but since you do not post the full stack trace
>>> it is hard to help.
>>>  
>>> Are you using vti tunnel ?
>>
>> there's no working logs of vpn/vti/tun on platform or kernel history.
>> and callstack has no functions about that.
>> it looks like simple ipv4 usage.
>>
>> attaching full dump info.
>> no additional bug or warning on entire kernel history.
>> anything about tun or kasan even onther.
>>
>> thanks.
>>
>>
>> <4>[60392.948306] I[1:    ksoftirqd/1:   19] ------------[ cut here ]------------
>> <0>[60392.948334] I[1:    ksoftirqd/1:   19] kernel BUG at net/ipv4/tcp_ipv4.c:519!
> 
> What the code looks like at line 519 of net/ipv4/tcp_ipv4.c ?
> 
> This is not a pristine kernel, anything could be wrong, you might have missed some critical backports.

The current code checks if icsk->icsk_backoff is not zero, so it looks like we have to move
some code like this.

It looks a silly bug to have no packet in write/rtx queues, and a non zero icsk_backoff.



diff --git a/net/ipv4/tcp.c b/net/ipv4/tcp.c
index 2079145a3b7c5f498af429c9a8289342e4421fca..cf3c5095c10e8e7e56621beae2f93c93de184489 100644
--- a/net/ipv4/tcp.c
+++ b/net/ipv4/tcp.c
@@ -2528,6 +2528,7 @@ void tcp_write_queue_purge(struct sock *sk)
        sk_mem_reclaim(sk);
        tcp_clear_all_retrans_hints(tcp_sk(sk));
        tcp_sk(sk)->packets_out = 0;
+       inet_csk(sk)->icsk_backoff = 0;
 }
 
 int tcp_disconnect(struct sock *sk, int flags)
@@ -2576,7 +2577,6 @@ int tcp_disconnect(struct sock *sk, int flags)
        tp->write_seq += tp->max_window + 2;
        if (tp->write_seq == 0)
                tp->write_seq = 1;
-       icsk->icsk_backoff = 0;
        tp->snd_cwnd = 2;
        icsk->icsk_probes_out = 0;
        tp->snd_ssthresh = TCP_INFINITE_SSTHRESH;



  parent reply	other threads:[~2019-02-15  1:30 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CGME20190214074641epcms1p1db1c5589f96718a440a166328eec9ebd@epcms1p1>
2019-02-14  7:46 ` [Bug reporting] kernel panic during handle the dst unreach icmp msg 배석진
2019-02-14 17:15   ` Eric Dumazet
2019-02-14 23:54     ` 배석진
2019-02-15  1:08       ` (2) " Eric Dumazet
2019-02-15  1:30         ` 배석진
2019-02-15  1:30         ` Eric Dumazet [this message]
2019-02-15  1:37           ` 배석진
2019-02-15  1:41             ` (2) " Eric Dumazet

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ef47d25c-a37e-8259-ce01-14a8e4c1cd9a@gmail.com \
    --to=eric.dumazet@gmail.com \
    --cc=jongeon.park@samsung.com \
    --cc=netdev@vger.kernel.org \
    --cc=soukjin.bae@samsung.com \
    --cc=ycheng@google.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox