From: syzbot <syzbot+dc57fd6722deb17e92af@syzkaller.appspotmail.com>
To: linux-kernel@vger.kernel.org
Subject: Forwarded: [PATCH] BUG: using smp_processor_id() in preemptible code in sk_skb_reason_drop
Date: Wed, 16 Sep 2026 18:23:02 -0700 [thread overview]
Message-ID: <6aab40f6.71f81b7d.278072.0005.GAE@google.com> (raw)
In-Reply-To: <6aa316b2.f81106d8.2ab401.0014.GAE@google.com>
For archival purposes, forwarding an incoming command email to
linux-kernel@vger.kernel.org.
***
Subject: [PATCH] BUG: using smp_processor_id() in preemptible code in sk_skb_reason_drop
Author: jchuang26@m.fudan.edu.cn
#syz test: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
Reported-by: syzbot+dc57fd6722deb17e92af@syzkaller.appspotmail.com
diff --git a/net/core/drop_monitor.c b/net/core/drop_monitor.c
index abaf108ac..80b56a47c 100644
--- a/net/core/drop_monitor.c
+++ b/net/core/drop_monitor.c
@@ -516,7 +516,14 @@ static void net_dm_packet_trace_kfree_skb_hit(void *ignore,
*/
nskb->tstamp = tstamp;
- data = this_cpu_ptr(&dm_cpu_data);
+ /*
+ * This function may be called from preemptible context (e.g. when
+ * kfree_skb() is called from process context), so use raw_cpu_ptr()
+ * to avoid the debug_smp_processor_id() warning emitted by
+ * this_cpu_ptr(). CPU migration after the pointer is fetched is
+ * harmless because the per-CPU data is serialized by the lock below.
+ */
+ data = raw_cpu_ptr(&dm_cpu_data);
spin_lock_irqsave(&data->drop_queue.lock, flags);
if (skb_queue_len(&data->drop_queue) < net_dm_queue_len)
prev parent reply other threads:[~2026-09-17 1:23 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-10 20:44 [syzbot] [net?] " syzbot
2026-09-14 11:30 ` Forwarded: [PATCH] " syzbot
2026-09-15 1:38 ` syzbot
2026-09-17 1:23 ` syzbot [this message]
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=6aab40f6.71f81b7d.278072.0005.GAE@google.com \
--to=syzbot+dc57fd6722deb17e92af@syzkaller.appspotmail.com \
--cc=linux-kernel@vger.kernel.org \
/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®