syzbot


BUG: using smp_processor_id() in preemptible code in clock_was_set

Status: fixed on 2021/11/10 00:50
Subsystems: kernel
[Documentation on labels]
Fix commit: 9482fd71dbb8 hrtimer: Use raw_cpu_ptr() in clock_was_set()
First crash: 986d, last: 985d
Cause bisection: introduced by (bisect log) :
commit e71a4153b7c256ec103e79875398553808aeffd2
Author: Thomas Gleixner <tglx@linutronix.de>
Date: Tue Jul 13 13:39:49 2021 +0000

  hrtimer: Force clock_was_set() handling for the HIGHRES=n, NOHZ=y case

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

Sample crash report:
BUG: using smp_processor_id() in preemptible [00000000] code: syz-executor107/6565
caller is hrtimer_hres_active kernel/time/hrtimer.c:652 [inline]
caller is clock_was_set+0x82/0x7f0 kernel/time/hrtimer.c:950
CPU: 1 PID: 6565 Comm: syz-executor107 Not tainted 5.14.0-rc5-next-20210812-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
Call Trace:
 __dump_stack lib/dump_stack.c:88 [inline]
 dump_stack_lvl+0xcd/0x134 lib/dump_stack.c:106
 check_preemption_disabled+0x13e/0x140 lib/smp_processor_id.c:49
 hrtimer_hres_active kernel/time/hrtimer.c:652 [inline]
 clock_was_set+0x82/0x7f0 kernel/time/hrtimer.c:950
 timekeeping_inject_offset+0x4b4/0x620 kernel/time/timekeeping.c:1375
 do_adjtimex+0x28f/0xa90 kernel/time/timekeeping.c:2409
 do_clock_adjtime kernel/time/posix-timers.c:1109 [inline]
 __do_sys_clock_adjtime+0x163/0x270 kernel/time/posix-timers.c:1121
 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:0x43ef39
Code: 28 c3 e8 2a 14 00 00 66 2e 0f 1f 84 00 00 00 00 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 c0 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007ffd41212258 EFLAGS: 00000246 ORIG_RAX: 0000000000000131
RAX: ffffffffffffffda RBX: 0000000000400488 RCX: 000000000043ef39

Crashes (231):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2021/08/12 19:28 linux-next 9b992972fb9c 6972b106 .config console log report syz C ci-upstream-linux-next-kasan-gce-root BUG: using smp_processor_id() in preemptible code in clock_was_set
2021/08/13 11:13 linux-next 9b992972fb9c 3fd2ea69 .config console log report info ci-upstream-linux-next-kasan-gce-root BUG: using smp_processor_id() in preemptible code in clock_was_set
2021/08/13 09:57 linux-next 9b992972fb9c 3fd2ea69 .config console log report info ci-upstream-linux-next-kasan-gce-root BUG: using smp_processor_id() in preemptible code in clock_was_set
2021/08/13 09:04 linux-next 9b992972fb9c 3fd2ea69 .config console log report info ci-upstream-linux-next-kasan-gce-root BUG: using smp_processor_id() in preemptible code in clock_was_set
2021/08/13 08:02 linux-next 9b992972fb9c 3fd2ea69 .config console log report info ci-upstream-linux-next-kasan-gce-root BUG: using smp_processor_id() in preemptible code in clock_was_set
2021/08/13 06:34 linux-next 9b992972fb9c 3fd2ea69 .config console log report info ci-upstream-linux-next-kasan-gce-root BUG: using smp_processor_id() in preemptible code in clock_was_set
2021/08/13 06:32 linux-next 9b992972fb9c 3fd2ea69 .config console log report info ci-upstream-linux-next-kasan-gce-root BUG: using smp_processor_id() in preemptible code in clock_was_set
2021/08/13 05:25 linux-next 9b992972fb9c 3fd2ea69 .config console log report info ci-upstream-linux-next-kasan-gce-root BUG: using smp_processor_id() in preemptible code in clock_was_set
2021/08/13 03:57 linux-next 9b992972fb9c 3fd2ea69 .config console log report info ci-upstream-linux-next-kasan-gce-root BUG: using smp_processor_id() in preemptible code in clock_was_set
2021/08/13 02:45 linux-next 9b992972fb9c 3fd2ea69 .config console log report info ci-upstream-linux-next-kasan-gce-root BUG: using smp_processor_id() in preemptible code in clock_was_set
2021/08/13 01:37 linux-next 9b992972fb9c 3fd2ea69 .config console log report info ci-upstream-linux-next-kasan-gce-root BUG: using smp_processor_id() in preemptible code in clock_was_set
2021/08/13 00:33 linux-next 9b992972fb9c 3fd2ea69 .config console log report info ci-upstream-linux-next-kasan-gce-root BUG: using smp_processor_id() in preemptible code in clock_was_set
2021/08/13 00:33 linux-next 9b992972fb9c 3fd2ea69 .config console log report info ci-upstream-linux-next-kasan-gce-root BUG: using smp_processor_id() in preemptible code in clock_was_set
2021/08/12 23:28 linux-next 9b992972fb9c 3fd2ea69 .config console log report info ci-upstream-linux-next-kasan-gce-root BUG: using smp_processor_id() in preemptible code in clock_was_set
2021/08/12 22:35 linux-next 9b992972fb9c 3fd2ea69 .config console log report info ci-upstream-linux-next-kasan-gce-root BUG: using smp_processor_id() in preemptible code in clock_was_set
2021/08/12 22:18 linux-next 9b992972fb9c 3fd2ea69 .config console log report info ci-upstream-linux-next-kasan-gce-root BUG: using smp_processor_id() in preemptible code in clock_was_set
2021/08/12 21:11 linux-next 9b992972fb9c 3fd2ea69 .config console log report info ci-upstream-linux-next-kasan-gce-root BUG: using smp_processor_id() in preemptible code in clock_was_set
2021/08/12 20:31 linux-next 9b992972fb9c 3fd2ea69 .config console log report info ci-upstream-linux-next-kasan-gce-root BUG: using smp_processor_id() in preemptible code in clock_was_set
2021/08/12 19:20 linux-next 9b992972fb9c 6972b106 .config console log report info ci-upstream-linux-next-kasan-gce-root BUG: using smp_processor_id() in preemptible code in clock_was_set
2021/08/12 17:50 linux-next 9b992972fb9c 6972b106 .config console log report info ci-upstream-linux-next-kasan-gce-root BUG: using smp_processor_id() in preemptible code in clock_was_set
2021/08/12 16:00 linux-next 9b992972fb9c 6972b106 .config console log report info ci-upstream-linux-next-kasan-gce-root BUG: using smp_processor_id() in preemptible code in clock_was_set
2021/08/12 15:24 linux-next 9b992972fb9c 6972b106 .config console log report info ci-upstream-linux-next-kasan-gce-root BUG: using smp_processor_id() in preemptible code in clock_was_set
2021/08/12 15:17 linux-next 9b992972fb9c 6972b106 .config console log report info ci-upstream-linux-next-kasan-gce-root BUG: using smp_processor_id() in preemptible code in clock_was_set
2021/08/12 14:13 linux-next 9b992972fb9c 6972b106 .config console log report info ci-upstream-linux-next-kasan-gce-root BUG: using smp_processor_id() in preemptible code in clock_was_set
2021/08/12 14:06 linux-next 9b992972fb9c 6972b106 .config console log report info ci-upstream-linux-next-kasan-gce-root BUG: using smp_processor_id() in preemptible code in clock_was_set
2021/08/12 14:03 linux-next 9b992972fb9c 6972b106 .config console log report info ci-upstream-linux-next-kasan-gce-root BUG: using smp_processor_id() in preemptible code in clock_was_set
2021/08/12 14:01 linux-next 9b992972fb9c 6972b106 .config console log report info ci-upstream-linux-next-kasan-gce-root BUG: using smp_processor_id() in preemptible code in clock_was_set
2021/08/12 13:57 linux-next 9b992972fb9c 6972b106 .config console log report info ci-upstream-linux-next-kasan-gce-root BUG: using smp_processor_id() in preemptible code in clock_was_set
2021/08/12 13:52 linux-next 9b992972fb9c 6972b106 .config console log report info ci-upstream-linux-next-kasan-gce-root BUG: using smp_processor_id() in preemptible code in clock_was_set
2021/08/12 13:50 linux-next 9b992972fb9c 6972b106 .config console log report info ci-upstream-linux-next-kasan-gce-root BUG: using smp_processor_id() in preemptible code in clock_was_set
2021/08/12 13:49 linux-next 9b992972fb9c 6972b106 .config console log report info ci-upstream-linux-next-kasan-gce-root BUG: using smp_processor_id() in preemptible code in clock_was_set
2021/08/12 13:45 linux-next 9b992972fb9c 6972b106 .config console log report info ci-upstream-linux-next-kasan-gce-root BUG: using smp_processor_id() in preemptible code in clock_was_set
2021/08/12 13:44 linux-next 9b992972fb9c 6972b106 .config console log report info ci-upstream-linux-next-kasan-gce-root BUG: using smp_processor_id() in preemptible code in clock_was_set
2021/08/12 13:44 linux-next 9b992972fb9c 6972b106 .config console log report info ci-upstream-linux-next-kasan-gce-root BUG: using smp_processor_id() in preemptible code in clock_was_set
2021/08/12 13:36 linux-next 9b992972fb9c 6972b106 .config console log report info ci-upstream-linux-next-kasan-gce-root BUG: using smp_processor_id() in preemptible code in clock_was_set
2021/08/12 13:35 linux-next 9b992972fb9c 6972b106 .config console log report info ci-upstream-linux-next-kasan-gce-root BUG: using smp_processor_id() in preemptible code in clock_was_set
2021/08/12 13:30 linux-next 9b992972fb9c 6972b106 .config console log report info ci-upstream-linux-next-kasan-gce-root BUG: using smp_processor_id() in preemptible code in clock_was_set
2021/08/12 13:19 linux-next 9b992972fb9c 6972b106 .config console log report info ci-upstream-linux-next-kasan-gce-root BUG: using smp_processor_id() in preemptible code in clock_was_set
2021/08/12 13:18 linux-next 9b992972fb9c 6972b106 .config console log report info ci-upstream-linux-next-kasan-gce-root BUG: using smp_processor_id() in preemptible code in clock_was_set
2021/08/12 13:16 linux-next 9b992972fb9c 6972b106 .config console log report info ci-upstream-linux-next-kasan-gce-root BUG: using smp_processor_id() in preemptible code in clock_was_set
2021/08/12 13:12 linux-next 9b992972fb9c 6972b106 .config console log report info ci-upstream-linux-next-kasan-gce-root BUG: using smp_processor_id() in preemptible code in clock_was_set
2021/08/12 13:09 linux-next 9b992972fb9c 6972b106 .config console log report info ci-upstream-linux-next-kasan-gce-root BUG: using smp_processor_id() in preemptible code in clock_was_set
2021/08/12 13:06 linux-next 9b992972fb9c 6972b106 .config console log report info ci-upstream-linux-next-kasan-gce-root BUG: using smp_processor_id() in preemptible code in clock_was_set
2021/08/12 13:03 linux-next 9b992972fb9c 6972b106 .config console log report info ci-upstream-linux-next-kasan-gce-root BUG: using smp_processor_id() in preemptible code in clock_was_set
2021/08/12 11:42 linux-next 9b992972fb9c 6972b106 .config console log report info ci-upstream-linux-next-kasan-gce-root BUG: using smp_processor_id() in preemptible code in clock_was_set
* Struck through repros no longer work on HEAD.