Re: [ 107.226562] WARNING: CPU: 0 PID: 11763 at net/ipv4/tcp_input.c:3086 tcp_ack+0x10e3/0x1380

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Oct 17, 2018 at 10:29 PM Eric Dumazet <edumazet@xxxxxxxxxx> wrote:
>
> On Wed, Oct 17, 2018 at 10:19 PM Andrei Vagin <avagin@xxxxxxxxx> wrote:
> >
> > Hi Eric,
> >
> > We have a robot which runs CRIU tests for net-next and today it
> > detected a new warning. It looks like it may be connected with the
> > "tcp: switch to Early Departure Time model" series.
>
>
> Hi Andrei,
>
> Thanks a lot for the report, I will take a look at it.

This is probably because tcp_pacing_check() might return true while
tcp REPAIR expect to process all skbs in tcp_write_xmit()

What do you think of following fix ?

diff --git a/net/ipv4/tcp_output.c b/net/ipv4/tcp_output.c
index d212e4cbc68902e873afb4a12b43b467ccd6069b..dd48f885fd805330752586cad7fdcdcfb06731e4
100644
--- a/net/ipv4/tcp_output.c
+++ b/net/ipv4/tcp_output.c
@@ -2321,18 +2321,18 @@ static bool tcp_write_xmit(struct sock *sk,
unsigned int mss_now, int nonagle,
        while ((skb = tcp_send_head(sk))) {
                unsigned int limit;

-               if (tcp_pacing_check(sk))
-                       break;
-
-               tso_segs = tcp_init_tso_segs(skb, mss_now);
-               BUG_ON(!tso_segs);
-
                if (unlikely(tp->repair) && tp->repair_queue ==
TCP_SEND_QUEUE) {
                        /* "skb_mstamp" is used as a start point for
the retransmit timer */
                        tcp_update_skb_after_send(sk, skb, tp->tcp_wstamp_ns);
                        goto repair; /* Skip network transmission */
                }

+               if (tcp_pacing_check(sk))
+                       break;
+
+               tso_segs = tcp_init_tso_segs(skb, mss_now);
+               BUG_ON(!tso_segs);
+
                cwnd_quota = tcp_cwnd_test(tp, skb);
                if (!cwnd_quota) {
                        if (push_one == 2)



[Index of Archives]     [Linux Kernel]     [Linux USB Development]     [Yosemite News]     [Linux SCSI]

  Powered by Linux