All of lore.kernel.org
 help / color / mirror / Atom feed
From: Eric Dumazet <eric.dumazet@gmail.com>
To: syzbot <syzbot+0251e883fe39e7a0cb0a@syzkaller.appspotmail.com>,
	Jason@zx2c4.com, davem@davemloft.net, f.fainelli@gmail.com,
	gregkh@linuxfoundation.org, jhs@mojatatu.com, jiri@resnulli.us,
	krzk@kernel.org, kuba@kernel.org, kvalo@codeaurora.org,
	leon@kernel.org, linux-kernel@vger.kernel.org,
	linux-kselftest@vger.kernel.org, netdev@vger.kernel.org,
	shuah@kernel.org, syzkaller-bugs@googlegroups.com,
	tglx@linutronix.de, vivien.didelot@gmail.com,
	xiyou.wangcong@gmail.com
Subject: Re: INFO: rcu detected stall in wg_packet_tx_worker
Date: Sun, 26 Apr 2020 12:40:47 -0700	[thread overview]
Message-ID: <e40c443e-74aa-bad4-7be8-4cdddfdf3eaf@gmail.com> (raw)
In-Reply-To: <0000000000005fd19505a4355311@google.com>



On 4/26/20 10:57 AM, syzbot wrote:
> syzbot has bisected this bug to:
> 
> commit e7096c131e5161fa3b8e52a650d7719d2857adfd
> Author: Jason A. Donenfeld <Jason@zx2c4.com>
> Date:   Sun Dec 8 23:27:34 2019 +0000
> 
>     net: WireGuard secure network tunnel
> 
> bisection log:  https://syzkaller.appspot.com/x/bisect.txt?x=15258fcfe00000
> start commit:   b2768df2 Merge branch 'for-linus' of git://git.kernel.org/..
> git tree:       upstream
> final crash:    https://syzkaller.appspot.com/x/report.txt?x=17258fcfe00000
> console output: https://syzkaller.appspot.com/x/log.txt?x=13258fcfe00000
> kernel config:  https://syzkaller.appspot.com/x/.config?x=b7a70e992f2f9b68
> dashboard link: https://syzkaller.appspot.com/bug?extid=0251e883fe39e7a0cb0a
> userspace arch: i386
> syz repro:      https://syzkaller.appspot.com/x/repro.syz?x=15f5f47fe00000
> C reproducer:   https://syzkaller.appspot.com/x/repro.c?x=11e8efb4100000
> 
> Reported-by: syzbot+0251e883fe39e7a0cb0a@syzkaller.appspotmail.com
> Fixes: e7096c131e51 ("net: WireGuard secure network tunnel")
> 
> For information about bisection process see: https://goo.gl/tpsmEJ#bisection
> 

I have not looked at the repro closely, but WireGuard has some workers
that might loop forever, cond_resched() might help a bit.

diff --git a/drivers/net/wireguard/receive.c b/drivers/net/wireguard/receive.c
index da3b782ab7d31df11e381529b144bcc494234a38..349a71e1907e081c61967c77c9f25a6ec5e57a24 100644
--- a/drivers/net/wireguard/receive.c
+++ b/drivers/net/wireguard/receive.c
@@ -518,6 +518,7 @@ void wg_packet_decrypt_worker(struct work_struct *work)
                                &PACKET_CB(skb)->keypair->receiving)) ?
                                PACKET_STATE_CRYPTED : PACKET_STATE_DEAD;
                wg_queue_enqueue_per_peer_napi(skb, state);
+               cond_resched();
        }
 }
 
diff --git a/drivers/net/wireguard/send.c b/drivers/net/wireguard/send.c
index 7348c10cbae3db54bfcb31f23c2753185735f876..f5b88693176c84b4bfdf8c4e05071481a3ce45b5 100644
--- a/drivers/net/wireguard/send.c
+++ b/drivers/net/wireguard/send.c
@@ -281,6 +281,7 @@ void wg_packet_tx_worker(struct work_struct *work)
 
                wg_noise_keypair_put(keypair, false);
                wg_peer_put(peer);
+               cond_resched();
        }
 }
 

  reply	other threads:[~2020-04-26 19:40 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-26 17:38 INFO: rcu detected stall in wg_packet_tx_worker syzbot
2020-04-26 17:57 ` syzbot
2020-04-26 19:40   ` Eric Dumazet [this message]
2020-04-26 19:42     ` Jason A. Donenfeld
2020-04-26 19:52       ` Jason A. Donenfeld
2020-04-26 19:58         ` Jason A. Donenfeld
2020-04-26 20:26       ` Eric Dumazet
2020-04-26 20:38         ` Eric Dumazet
2020-04-26 20:46           ` Jason A. Donenfeld
2020-04-26 21:53             ` Eric Dumazet
2020-05-04 11:23               ` Jason A. Donenfeld

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=e40c443e-74aa-bad4-7be8-4cdddfdf3eaf@gmail.com \
    --to=eric.dumazet@gmail.com \
    --cc=Jason@zx2c4.com \
    --cc=davem@davemloft.net \
    --cc=f.fainelli@gmail.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=jhs@mojatatu.com \
    --cc=jiri@resnulli.us \
    --cc=krzk@kernel.org \
    --cc=kuba@kernel.org \
    --cc=kvalo@codeaurora.org \
    --cc=leon@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=shuah@kernel.org \
    --cc=syzbot+0251e883fe39e7a0cb0a@syzkaller.appspotmail.com \
    --cc=syzkaller-bugs@googlegroups.com \
    --cc=tglx@linutronix.de \
    --cc=vivien.didelot@gmail.com \
    --cc=xiyou.wangcong@gmail.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.