syzbot


BUG: using smp_processor_id() in preemptible code in tun_chr_write_iter

Status: fixed on 2023/02/24 13:50
Subsystems: net
[Documentation on labels]
Fix commit: fc93db153b01 net: disable preemption in dev_core_stats_XXX_inc() helpers
First crash: 999d, last: 990d
Cause bisection: introduced by (bisect log) :
commit 625788b5844511cf4c30cffa7fa0bc3a69cebc82
Author: Eric Dumazet <edumazet@google.com>
Date: Fri Mar 11 05:14:20 2022 +0000

  net: add per-cpu storage and net->core_stats

Crash: BUG: using smp_processor_id() in preemptible code in tun_chr_write_iter (log)
Repro: C syz .config
  

Sample crash report:
BUG: using smp_processor_id() in preemptible [00000000] code: syz-executor230/3594
caller is dev_core_stats include/linux/netdevice.h:3853 [inline]
caller is dev_core_stats_rx_dropped_inc include/linux/netdevice.h:3866 [inline]
caller is tun_get_user+0x1b33/0x3ab0 drivers/net/tun.c:1844
CPU: 0 PID: 3594 Comm: syz-executor230 Not tainted 5.17.0-rc7-syzkaller-02443-gd96657dc9238 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
Call Trace:
 <TASK>
 __dump_stack lib/dump_stack.c:88 [inline]
 dump_stack_lvl+0xcd/0x134 lib/dump_stack.c:106
 check_preemption_disabled+0x16b/0x170 lib/smp_processor_id.c:49
 dev_core_stats include/linux/netdevice.h:3853 [inline]
 dev_core_stats_rx_dropped_inc include/linux/netdevice.h:3866 [inline]
 tun_get_user+0x1b33/0x3ab0 drivers/net/tun.c:1844
 tun_chr_write_iter+0xe1/0x200 drivers/net/tun.c:2015
 call_write_iter include/linux/fs.h:2074 [inline]
 new_sync_write+0x431/0x660 fs/read_write.c:503
 vfs_write+0x7cd/0xae0 fs/read_write.c:590
 ksys_write+0x12d/0x250 fs/read_write.c:643
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x35/0xb0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x44/0xae
RIP: 0033:0x7f08a479fbb3
Code: 5d 41 5c 41 5d 41 5e e9 9b fd ff ff 66 2e 0f 1f 84 00 00 00 00 00 90 64 8b 04 25 18 00 00 00 85 c0 75 14 b8 01 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 55 c3 0f 1f 40 00 48 83 ec 28 48 89 54 24 18
RSP: 002b:00007ffd619386f8 EFLAGS: 00000246 ORIG_RAX: 0000000000000001
RAX: ffffffffffffffda RBX: 00000000000f4240 RCX: 00007f08a479fbb3
RDX: 00000000000020a7 RSI: 0000000020000000 RDI: 00000000000000c8
RBP: 0000000000000000 R08: 0000000000000000 R09: 00007ffd61938170
R10: 0000000000000000 R11: 0000000000000246 R12: 000000000000be00
R13: 00007ffd61938720 R14: 00007ffd61938710 R15: 00007ffd61938704
 </TASK>

Crashes (1834):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2022/03/14 15:36 net-next-old d96657dc9238 9e8eaa75 .config console log report syz C ci-upstream-net-kasan-gce BUG: using smp_processor_id() in preemptible code in tun_chr_write_iter
2022/03/22 03:47 net-next-old d96657dc9238 e2d91b1d .config console log report info ci-upstream-net-kasan-gce BUG: using smp_processor_id() in preemptible code in tun_chr_write_iter
2022/03/22 02:42 net-next-old d96657dc9238 e2d91b1d .config console log report info ci-upstream-net-kasan-gce BUG: using smp_processor_id() in preemptible code in tun_chr_write_iter
2022/03/22 02:27 net-next-old d96657dc9238 e2d91b1d .config console log report info ci-upstream-net-kasan-gce BUG: using smp_processor_id() in preemptible code in tun_chr_write_iter
2022/03/22 01:26 net-next-old d96657dc9238 e2d91b1d .config console log report info ci-upstream-net-kasan-gce BUG: using smp_processor_id() in preemptible code in tun_chr_write_iter
2022/03/22 00:23 net-next-old d96657dc9238 e2d91b1d .config console log report info ci-upstream-net-kasan-gce BUG: using smp_processor_id() in preemptible code in tun_chr_write_iter
2022/03/21 23:30 net-next-old d96657dc9238 e2d91b1d .config console log report info ci-upstream-net-kasan-gce BUG: using smp_processor_id() in preemptible code in tun_chr_write_iter
2022/03/21 22:29 net-next-old d96657dc9238 e2d91b1d .config console log report info ci-upstream-net-kasan-gce BUG: using smp_processor_id() in preemptible code in tun_chr_write_iter
2022/03/21 21:39 net-next-old d96657dc9238 e2d91b1d .config console log report info ci-upstream-net-kasan-gce BUG: using smp_processor_id() in preemptible code in tun_chr_write_iter
2022/03/21 20:31 net-next-old d96657dc9238 e2d91b1d .config console log report info ci-upstream-net-kasan-gce BUG: using smp_processor_id() in preemptible code in tun_chr_write_iter
2022/03/21 19:29 net-next-old d96657dc9238 e2d91b1d .config console log report info ci-upstream-net-kasan-gce BUG: using smp_processor_id() in preemptible code in tun_chr_write_iter
2022/03/21 18:47 net-next-old d96657dc9238 e2d91b1d .config console log report info ci-upstream-net-kasan-gce BUG: using smp_processor_id() in preemptible code in tun_chr_write_iter
2022/03/21 17:41 net-next-old d96657dc9238 e2d91b1d .config console log report info ci-upstream-net-kasan-gce BUG: using smp_processor_id() in preemptible code in tun_chr_write_iter
2022/03/21 16:52 net-next-old d96657dc9238 e2d91b1d .config console log report info ci-upstream-net-kasan-gce BUG: using smp_processor_id() in preemptible code in tun_chr_write_iter
2022/03/21 15:48 net-next-old d96657dc9238 e2d91b1d .config console log report info ci-upstream-net-kasan-gce BUG: using smp_processor_id() in preemptible code in tun_chr_write_iter
2022/03/21 15:29 net-next-old d96657dc9238 e2d91b1d .config console log report info ci-upstream-net-kasan-gce BUG: using smp_processor_id() in preemptible code in tun_chr_write_iter
2022/03/21 14:23 net-next-old d96657dc9238 e2d91b1d .config console log report info ci-upstream-net-kasan-gce BUG: using smp_processor_id() in preemptible code in tun_chr_write_iter
2022/03/21 13:40 net-next-old d96657dc9238 e2d91b1d .config console log report info ci-upstream-net-kasan-gce BUG: using smp_processor_id() in preemptible code in tun_chr_write_iter
2022/03/21 12:36 net-next-old d96657dc9238 e2d91b1d .config console log report info ci-upstream-net-kasan-gce BUG: using smp_processor_id() in preemptible code in tun_chr_write_iter
2022/03/21 12:19 net-next-old d96657dc9238 e2d91b1d .config console log report info ci-upstream-net-kasan-gce BUG: using smp_processor_id() in preemptible code in tun_chr_write_iter
2022/03/21 11:09 net-next-old d96657dc9238 e2d91b1d .config console log report info ci-upstream-net-kasan-gce BUG: using smp_processor_id() in preemptible code in tun_chr_write_iter
2022/03/21 10:35 net-next-old d96657dc9238 e2d91b1d .config console log report info ci-upstream-net-kasan-gce BUG: using smp_processor_id() in preemptible code in tun_chr_write_iter
2022/03/21 09:34 net-next-old d96657dc9238 e2d91b1d .config console log report info ci-upstream-net-kasan-gce BUG: using smp_processor_id() in preemptible code in tun_chr_write_iter
2022/03/21 08:24 net-next-old d96657dc9238 e2d91b1d .config console log report info ci-upstream-net-kasan-gce BUG: using smp_processor_id() in preemptible code in tun_chr_write_iter
2022/03/21 08:03 net-next-old d96657dc9238 e2d91b1d .config console log report info ci-upstream-net-kasan-gce BUG: using smp_processor_id() in preemptible code in tun_chr_write_iter
2022/03/21 06:58 net-next-old d96657dc9238 e2d91b1d .config console log report info ci-upstream-net-kasan-gce BUG: using smp_processor_id() in preemptible code in tun_chr_write_iter
2022/03/21 05:55 net-next-old d96657dc9238 e2d91b1d .config console log report info ci-upstream-net-kasan-gce BUG: using smp_processor_id() in preemptible code in tun_chr_write_iter
2022/03/21 04:52 net-next-old d96657dc9238 e2d91b1d .config console log report info ci-upstream-net-kasan-gce BUG: using smp_processor_id() in preemptible code in tun_chr_write_iter
2022/03/21 04:48 net-next-old d96657dc9238 e2d91b1d .config console log report info ci-upstream-net-kasan-gce BUG: using smp_processor_id() in preemptible code in tun_chr_write_iter
2022/03/21 03:46 net-next-old d96657dc9238 e2d91b1d .config console log report info ci-upstream-net-kasan-gce BUG: using smp_processor_id() in preemptible code in tun_chr_write_iter
2022/03/21 02:19 net-next-old d96657dc9238 e2d91b1d .config console log report info ci-upstream-net-kasan-gce BUG: using smp_processor_id() in preemptible code in tun_chr_write_iter
2022/03/21 02:06 net-next-old d96657dc9238 e2d91b1d .config console log report info ci-upstream-net-kasan-gce BUG: using smp_processor_id() in preemptible code in tun_chr_write_iter
2022/03/21 01:01 net-next-old d96657dc9238 e2d91b1d .config console log report info ci-upstream-net-kasan-gce BUG: using smp_processor_id() in preemptible code in tun_chr_write_iter
2022/03/21 00:00 net-next-old d96657dc9238 e2d91b1d .config console log report info ci-upstream-net-kasan-gce BUG: using smp_processor_id() in preemptible code in tun_chr_write_iter
2022/03/20 23:11 net-next-old d96657dc9238 e2d91b1d .config console log report info ci-upstream-net-kasan-gce BUG: using smp_processor_id() in preemptible code in tun_chr_write_iter
2022/03/20 22:06 net-next-old d96657dc9238 e2d91b1d .config console log report info ci-upstream-net-kasan-gce BUG: using smp_processor_id() in preemptible code in tun_chr_write_iter
2022/03/20 20:38 net-next-old d96657dc9238 e2d91b1d .config console log report info ci-upstream-net-kasan-gce BUG: using smp_processor_id() in preemptible code in tun_chr_write_iter
2022/03/20 19:36 net-next-old d96657dc9238 e2d91b1d .config console log report info ci-upstream-net-kasan-gce BUG: using smp_processor_id() in preemptible code in tun_chr_write_iter
2022/03/20 19:02 net-next-old d96657dc9238 e2d91b1d .config console log report info ci-upstream-net-kasan-gce BUG: using smp_processor_id() in preemptible code in tun_chr_write_iter
2022/03/20 18:00 net-next-old d96657dc9238 e2d91b1d .config console log report info ci-upstream-net-kasan-gce BUG: using smp_processor_id() in preemptible code in tun_chr_write_iter
2022/03/20 17:56 net-next-old d96657dc9238 e2d91b1d .config console log report info ci-upstream-net-kasan-gce BUG: using smp_processor_id() in preemptible code in tun_chr_write_iter
2022/03/20 16:51 net-next-old d96657dc9238 e2d91b1d .config console log report info ci-upstream-net-kasan-gce BUG: using smp_processor_id() in preemptible code in tun_chr_write_iter
2022/03/20 15:51 net-next-old d96657dc9238 e2d91b1d .config console log report info ci-upstream-net-kasan-gce BUG: using smp_processor_id() in preemptible code in tun_chr_write_iter
2022/03/20 15:10 net-next-old d96657dc9238 e2d91b1d .config console log report info ci-upstream-net-kasan-gce BUG: using smp_processor_id() in preemptible code in tun_chr_write_iter
2022/03/12 18:48 net-next-old 97aeb877de7f 9e8eaa75 .config console log report info ci-upstream-net-kasan-gce BUG: using smp_processor_id() in preemptible code in tun_chr_write_iter
* Struck through repros no longer work on HEAD.