* [syzbot] [net?] BUG: using smp_processor_id() in preemptible code in sk_skb_reason_drop
@ 2026-09-10 20:44 syzbot
2026-09-14 11:30 ` Forwarded: [PATCH] " syzbot
0 siblings, 1 reply; 2+ messages in thread
From: syzbot @ 2026-09-10 20:44 UTC (permalink / raw)
To: davem, edumazet, horms, kuba, linux-kernel, netdev, nhorman,
pabeni, syzkaller-bugs
Hello,
syzbot found the following issue on:
HEAD commit: 50d05c7c76c9 Merge tag 'landlock-7.3-rc3' of git://git.ker..
git tree: upstream
console output: https://syzkaller.appspot.com/x/log.txt?x=1545c871580000
kernel config: https://syzkaller.appspot.com/x/.config?x=b454dc6b1b7acd30
dashboard link: https://syzkaller.appspot.com/bug?extid=dc57fd6722deb17e92af
compiler: Debian clang version 22.1.8 (++20260613092233+e80beda6e255-1~exp1~20260613092250.77), Debian LLD 22.1.8
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=15f6fe01580000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=17ab2c8e580000
Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/7171282977df/disk-50d05c7c.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/eb180d9b54d5/vmlinux-50d05c7c.xz
kernel image: https://storage.googleapis.com/syzbot-assets/ff1f279b8f9e/bzImage-50d05c7c.xz
IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: syzbot+dc57fd6722deb17e92af@syzkaller.appspotmail.com
BUG: using smp_processor_id() in preemptible [00000000] code: syz-executor/5601
caller is net_dm_packet_trace_kfree_skb_hit+0xdf/0x350 net/core/drop_monitor.c:519
CPU: 0 UID: 0 PID: 5601 Comm: syz-executor Not tainted syzkaller #0 PREEMPT_{RT,(full)}
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/24/2026
Call Trace:
<TASK>
dump_stack_lvl+0xe8/0x150 lib/dump_stack.c:120
check_preemption_disabled+0xcd/0xd0 lib/smp_processor_id.c:47
net_dm_packet_trace_kfree_skb_hit+0xdf/0x350 net/core/drop_monitor.c:519
__do_trace_kfree_skb include/trace/events/skb.h:24 [inline]
trace_kfree_skb+0x1d1/0x210 include/trace/events/skb.h:24
__sk_skb_reason_drop net/core/skbuff.c:1231 [inline]
sk_skb_reason_drop+0xdd/0x110 net/core/skbuff.c:1249
tcp_data_queue+0xb80/0x5fa0 net/ipv4/tcp_input.c:5709
tcp_rcv_established+0xe45/0x2910 net/ipv4/tcp_input.c:6689
tcp_v4_do_rcv+0x959/0x13f0 net/ipv4/tcp_ipv4.c:1854
sk_backlog_rcv include/net/sock.h:1192 [inline]
__release_sock+0x28e/0x3d0 net/core/sock.c:3263
release_sock+0x1be/0x290 net/core/sock.c:3862
tcp_recvmsg+0x106/0x540 net/ipv4/tcp.c:2946
sock_recvmsg_nosec net/socket.c:1153 [inline]
sock_recvmsg+0x166/0x1e0 net/socket.c:1173
sock_read_iter+0x233/0x300 net/socket.c:1242
new_sync_read fs/read_write.c:493 [inline]
vfs_read+0x59e/0xa90 fs/read_write.c:574
ksys_read+0x156/0x270 fs/read_write.c:716
do_syscall_x64 arch/x86/entry/syscall_64.c:61 [inline]
do_syscall_64+0x166/0x520 arch/x86/entry/syscall_64.c:84
entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7f32ab5392d7
Code: 48 89 fa 4c 89 df e8 a8 56 00 00 8b 93 08 03 00 00 59 5e 48 83 f8 fc 74 1a 5b c3 0f 1f 84 00 00 00 00 00 48 8b 44 24 10 0f 05 <5b> c3 0f 1f 80 00 00 00 00 83 e2 39 83 fa 08 75 de e8 23 ff ff ff
RSP: 002b:00007ffceb322d90 EFLAGS: 00000202 ORIG_RAX: 0000000000000000
RAX: ffffffffffffffda RBX: 0000555568ab5540 RCX: 00007f32ab5392d7
RDX: 0000000000000004 RSI: 00007ffceb322dec RDI: 0000000000000003
RBP: 00007ffceb323290 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000202 R12: 0000000000000004
R13: 00007ffceb322dec R14: 00007ffceb322e80 R15: 0000000000000000
</TASK>
---
This report is generated by a bot. It may contain errors.
See https://goo.gl/tpsmEJ for more information about syzbot.
syzbot engineers can be reached at syzkaller@googlegroups.com.
syzbot will keep track of this issue. See:
https://goo.gl/tpsmEJ#status for how to communicate with syzbot.
If the report is already addressed, let syzbot know by replying with:
#syz fix: exact-commit-title
If you want syzbot to run the reproducer, reply with:
#syz test: git://repo/address.git branch-or-commit-hash
If you attach or paste a git patch, syzbot will apply it before testing.
If you want to overwrite report's subsystems, reply with:
#syz set subsystems: new-subsystem
(See the list of subsystem names on the web dashboard)
If the report is a duplicate of another one, reply with:
#syz dup: exact-subject-of-another-report
If you want to undo deduplication, reply with:
#syz undup
^ permalink raw reply [flat|nested] 2+ messages in thread* Forwarded: [PATCH] BUG: using smp_processor_id() in preemptible code in sk_skb_reason_drop
2026-09-10 20:44 [syzbot] [net?] BUG: using smp_processor_id() in preemptible code in sk_skb_reason_drop syzbot
@ 2026-09-14 11:30 ` syzbot
0 siblings, 0 replies; 2+ messages in thread
From: syzbot @ 2026-09-14 11:30 UTC (permalink / raw)
To: linux-kernel
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 50d05c7c76c96b90462f24debacca971d2e86713
Reported-by: syzbot+dc57fd6722deb17e92af@syzkaller.appspotmail.com
diff --git a/net/core/drop_monitor.c b/net/core/drop_monitor.c
index abaf108ac..4c068d613 100644
--- a/net/core/drop_monitor.c
+++ b/net/core/drop_monitor.c
@@ -516,6 +516,15 @@ static void net_dm_packet_trace_kfree_skb_hit(void *ignore,
*/
nskb->tstamp = tstamp;
+ /*
+ * The tracepoint can run in preemptible context (e.g. from
+ * tcp_data_queue()). Pin the task to the current CPU before
+ * dereferencing the per-CPU pointer, otherwise this_cpu_ptr()
+ * triggers a "using smp_processor_id() in preemptible code"
+ * splat. migrate_disable() is used instead of preempt_disable()
+ * because the drop_queue spinlock can sleep on PREEMPT_RT.
+ */
+ migrate_disable();
data = this_cpu_ptr(&dm_cpu_data);
spin_lock_irqsave(&data->drop_queue.lock, flags);
@@ -527,6 +536,7 @@ static void net_dm_packet_trace_kfree_skb_hit(void *ignore,
schedule_work(&data->dm_alert_work);
+ migrate_enable();
return;
unlock_free:
@@ -534,6 +544,7 @@ static void net_dm_packet_trace_kfree_skb_hit(void *ignore,
u64_stats_inc(&data->stats.dropped);
u64_stats_update_end(&data->stats.syncp);
spin_unlock_irqrestore(&data->drop_queue.lock, flags);
+ migrate_enable();
consume_skb(nskb);
}
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-09-14 11:30 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-09-10 20:44 [syzbot] [net?] BUG: using smp_processor_id() in preemptible code in sk_skb_reason_drop syzbot
2026-09-14 11:30 ` Forwarded: [PATCH] " syzbot
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®