mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Hillf Danton <hdanton@sina.com>
To: syzbot <syzbot+afcbef13b9fa6ae41f9a@syzkaller.appspotmail.com>
Cc: linux-kernel@vger.kernel.org, syzkaller-bugs@googlegroups.com
Subject: Re: [syzbot] [bpf?] [net?] INFO: rcu detected stall in handle_softirqs
Date: Sat, 11 May 2024 19:06:14 +0800	[thread overview]
Message-ID: <20240511110614.2636-1-hdanton@sina.com> (raw)
In-Reply-To: <00000000000086d9cb061828a317@google.com>

On Sat, 11 May 2024 00:31:21 -0700
> syzbot found the following issue on:
> 
> HEAD commit:    ee5b455b0ada Merge tag 'slab-for-6.9-rc7-fixes' of git://g..
> git tree:       upstream
> C reproducer:   https://syzkaller.appspot.com/x/repro.c?x=105fcb4b180000

#syz test https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git  ee5b455b0ada

--- x/kernel/softirq.c
+++ y/kernel/softirq.c
@@ -517,6 +517,7 @@ static void handle_softirqs(bool ksirqd)
 	bool in_hardirq;
 	__u32 pending;
 	int softirq_bit;
+	unsigned long lt = 0;
 
 	/*
 	 * Mask out PF_MEMALLOC as the current task context is borrowed for the
@@ -542,6 +543,7 @@ restart:
 	while ((softirq_bit = ffs(pending))) {
 		unsigned int vec_nr;
 		int prev_count;
+		unsigned long t1, t2;
 
 		h += softirq_bit - 1;
 
@@ -551,7 +553,14 @@ restart:
 		kstat_incr_softirqs_this_cpu(vec_nr);
 
 		trace_softirq_entry(vec_nr);
+		t1 = jiffies;
 		h->action(h);
+		t2 = jiffies;
+		if (t1 + 2 < t2)
+			break;
+		lt += t2 - t1;
+		if (lt > 200)
+			break;
 		trace_softirq_exit(vec_nr);
 		if (unlikely(prev_count != preempt_count())) {
 			pr_err("huh, entered softirq %u %s %p with preempt_count %08x, exited with %08x?\n",
--

  reply	other threads:[~2024-05-11 11:06 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-11  7:31 syzbot
2024-05-11 11:06 ` Hillf Danton [this message]
2024-05-11 11:34   ` syzbot
2025-01-07 14:37 ` [syzbot] " syzbot

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=20240511110614.2636-1-hdanton@sina.com \
    --to=hdanton@sina.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=syzbot+afcbef13b9fa6ae41f9a@syzkaller.appspotmail.com \
    --cc=syzkaller-bugs@googlegroups.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

all inboxes | Powered by JetHome®