bisecting fixing commit since ffb217a13a2eaf6d5bd974fc83036a53ca69f1e2 building syzkaller on 7bdd8b2c56b883af3e65b261cd7c942104dc2ecc testing commit ffb217a13a2eaf6d5bd974fc83036a53ca69f1e2 compiler: gcc (GCC) 10.2.1 20210217, GNU ld (GNU Binutils for Debian) 2.35.2 kernel signature: 54d7556de05cf3140f1f7a478e492269bbafed990da600a9653390f8cf61092a all runs: crashed: INFO: task hung in chown_common testing current HEAD 9be9ed2612b5aedb52a2c240edb1630b6b743cb6 testing commit 9be9ed2612b5aedb52a2c240edb1630b6b743cb6 compiler: gcc (GCC) 10.2.1 20210217, GNU ld (GNU Binutils for Debian) 2.35.2 kernel signature: ef75a14249075aa879ef335b76f6bbf481846fda907f23da2f54f431bc2405ee run #0: basic kernel testing failed: BUG: program execution failed: executor NUM: exit status NUM run #1: crashed: INFO: task hung in chown_common run #2: crashed: INFO: task hung in chown_common run #3: crashed: INFO: task hung in chown_common run #4: crashed: INFO: task hung in chown_common run #5: crashed: INFO: task hung in chown_common run #6: crashed: INFO: task hung in chown_common run #7: crashed: INFO: task hung in chown_common run #8: crashed: INFO: task hung in chown_common run #9: crashed: INFO: task hung in chown_common revisions tested: 2, total time: 25m20.667579297s (build: 12m2.034195257s, test: 12m48.351062289s) the crash still happens on HEAD commit msg: Merge tag 'platform-drivers-x86-v5.18-4' of git://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86 crash: INFO: task hung in chown_common INFO: task syz-executor.5:4247 blocked for more than 143 seconds. Not tainted 5.18.0-rc6-syzkaller #0 "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message. task:syz-executor.5 state:D stack:29824 pid: 4247 ppid: 4050 flags:0x00000004 Call Trace: context_switch kernel/sched/core.c:5073 [inline] __schedule+0xa5a/0x4c70 kernel/sched/core.c:6388 schedule+0xd2/0x1f0 kernel/sched/core.c:6460 rwsem_down_write_slowpath+0x634/0x1110 kernel/locking/rwsem.c:1142 __down_write_common kernel/locking/rwsem.c:1259 [inline] __down_write_common kernel/locking/rwsem.c:1256 [inline] __down_write kernel/locking/rwsem.c:1268 [inline] down_write+0x135/0x150 kernel/locking/rwsem.c:1515 inode_lock include/linux/fs.h:748 [inline] chown_common+0x32b/0x5e0 fs/open.c:677 do_fchownat+0xcf/0x140 fs/open.c:711 __do_sys_chown fs/open.c:731 [inline] __se_sys_chown fs/open.c:729 [inline] __x64_sys_chown+0x72/0xb0 fs/open.c:729 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x35/0x80 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x44/0xae RIP: 0033:0x7f271ec89049 RSP: 002b:00007f271fd28168 EFLAGS: 00000246 ORIG_RAX: 000000000000005c RAX: ffffffffffffffda RBX: 00007f271ed9c030 RCX: 00007f271ec89049 RDX: 000000000000ee00 RSI: 000000000000ee00 RDI: 0000000020000040 RBP: 00007f271ece308d R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007ffebfd83f4f R14: 00007f271fd28300 R15: 0000000000022000 INFO: task syz-executor.1:4249 blocked for more than 143 seconds. Not tainted 5.18.0-rc6-syzkaller #0 "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message. task:syz-executor.1 state:D stack:29824 pid: 4249 ppid: 4113 flags:0x00000004 Call Trace: context_switch kernel/sched/core.c:5073 [inline] __schedule+0xa5a/0x4c70 kernel/sched/core.c:6388 schedule+0xd2/0x1f0 kernel/sched/core.c:6460 rwsem_down_write_slowpath+0x634/0x1110 kernel/locking/rwsem.c:1142 __down_write_common kernel/locking/rwsem.c:1259 [inline] __down_write_common kernel/locking/rwsem.c:1256 [inline] __down_write kernel/locking/rwsem.c:1268 [inline] down_write+0x135/0x150 kernel/locking/rwsem.c:1515 inode_lock include/linux/fs.h:748 [inline] chown_common+0x32b/0x5e0 fs/open.c:677 do_fchownat+0xcf/0x140 fs/open.c:711 __do_sys_chown fs/open.c:731 [inline] __se_sys_chown fs/open.c:729 [inline] __x64_sys_chown+0x72/0xb0 fs/open.c:729 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x35/0x80 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x44/0xae RIP: 0033:0x7f4bae689049 RSP: 002b:00007f4baf80f168 EFLAGS: 00000246 ORIG_RAX: 000000000000005c RAX: ffffffffffffffda RBX: 00007f4bae79c030 RCX: 00007f4bae689049 RDX: 000000000000ee00 RSI: 000000000000ee00 RDI: 0000000020000040 RBP: 00007f4bae6e308d R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007ffcce19716f R14: 00007f4baf80f300 R15: 0000000000022000 INFO: task syz-executor.4:4246 blocked for more than 144 seconds. Not tainted 5.18.0-rc6-syzkaller #0 "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message. task:syz-executor.4 state:D stack:29824 pid: 4246 ppid: 4049 flags:0x00000004 Call Trace: context_switch kernel/sched/core.c:5073 [inline] __schedule+0xa5a/0x4c70 kernel/sched/core.c:6388 schedule+0xd2/0x1f0 kernel/sched/core.c:6460 rwsem_down_write_slowpath+0x634/0x1110 kernel/locking/rwsem.c:1142 __down_write_common kernel/locking/rwsem.c:1259 [inline] __down_write_common kernel/locking/rwsem.c:1256 [inline] __down_write kernel/locking/rwsem.c:1268 [inline] down_write+0x135/0x150 kernel/locking/rwsem.c:1515 inode_lock include/linux/fs.h:748 [inline] chown_common+0x32b/0x5e0 fs/open.c:677 do_fchownat+0xcf/0x140 fs/open.c:711 __do_sys_chown fs/open.c:731 [inline] __se_sys_chown fs/open.c:729 [inline] __x64_sys_chown+0x72/0xb0 fs/open.c:729 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x35/0x80 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x44/0xae RIP: 0033:0x7fc869689049 RSP: 002b:00007fc86a7ee168 EFLAGS: 00000246 ORIG_RAX: 000000000000005c RAX: ffffffffffffffda RBX: 00007fc86979c030 RCX: 00007fc869689049 RDX: 000000000000ee00 RSI: 000000000000ee00 RDI: 0000000020000040 RBP: 00007fc8696e308d R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007ffc31eff4ff R14: 00007fc86a7ee300 R15: 0000000000022000 INFO: task syz-executor.3:4424 blocked for more than 145 seconds. Not tainted 5.18.0-rc6-syzkaller #0 "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message. task:syz-executor.3 state:D stack:29824 pid: 4424 ppid: 4266 flags:0x00000004 Call Trace: context_switch kernel/sched/core.c:5073 [inline] __schedule+0xa5a/0x4c70 kernel/sched/core.c:6388 schedule+0xd2/0x1f0 kernel/sched/core.c:6460 rwsem_down_write_slowpath+0x634/0x1110 kernel/locking/rwsem.c:1142 __down_write_common kernel/locking/rwsem.c:1259 [inline] __down_write_common kernel/locking/rwsem.c:1256 [inline] __down_write kernel/locking/rwsem.c:1268 [inline] down_write+0x135/0x150 kernel/locking/rwsem.c:1515 inode_lock include/linux/fs.h:748 [inline] chown_common+0x32b/0x5e0 fs/open.c:677 do_fchownat+0xcf/0x140 fs/open.c:711 __do_sys_chown fs/open.c:731 [inline] __se_sys_chown fs/open.c:729 [inline] __x64_sys_chown+0x72/0xb0 fs/open.c:729 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x35/0x80 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x44/0xae RIP: 0033:0x7f80d1e89049 RSP: 002b:00007f80d30b2168 EFLAGS: 00000246 ORIG_RAX: 000000000000005c RAX: ffffffffffffffda RBX: 00007f80d1f9c030 RCX: 00007f80d1e89049 RDX: 000000000000ee00 RSI: 000000000000ee00 RDI: 0000000020000040 RBP: 00007f80d1ee308d R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007ffd1031eb3f R14: 00007f80d30b2300 R15: 0000000000022000 Showing all locks held in the system: 1 lock held by khungtaskd/28: #0: ffffffff8ad773a0 (rcu_read_lock){....}-{1:2}, at: debug_show_all_locks+0x53/0x260 kernel/locking/lockdep.c:6467 2 locks held by getty/3271: #0: ffff88801c20a098 (&tty->ldisc_sem){++++}-{0:0}, at: tty_ldisc_ref_wait+0x1f/0x70 drivers/tty/tty_ldisc.c:244 #1: ffffc900028e62e8 (&ldata->atomic_read_lock){+.+.}-{3:3}, at: n_tty_read+0x9d7/0xed0 drivers/tty/n_tty.c:2075 2 locks held by kworker/0:6/4181: #0: ffff8880b9e39f18 (&rq->__lock){-.-.}-{2:2}, at: raw_spin_rq_lock_nested+0x2b/0x120 kernel/sched/core.c:554 #1: ffff8880b9e27888 (&per_cpu_ptr(group->pcpu, cpu)->seq){-.-.}-{0:0}, at: psi_task_switch+0x3e7/0x4e0 kernel/sched/psi.c:889 2 locks held by syz-executor.5/4243: 2 locks held by syz-executor.5/4247: #0: ffff88801f27c460 (sb_writers#14){.+.+}-{0:0}, at: do_fchownat+0xb8/0x140 fs/open.c:708 #1: ffff88806d740150 (&sb->s_type->i_mutex_key#21){++++}-{3:3}, at: inode_lock include/linux/fs.h:748 [inline] #1: ffff88806d740150 (&sb->s_type->i_mutex_key#21){++++}-{3:3}, at: chown_common+0x32b/0x5e0 fs/open.c:677 2 locks held by syz-executor.1/4242: 2 locks held by syz-executor.1/4249: #0: ffff8880200f6460 (sb_writers#14){.+.+}-{0:0}, at: do_fchownat+0xb8/0x140 fs/open.c:708 #1: ffff88806d5a92d8 (&sb->s_type->i_mutex_key#21){++++}-{3:3}, at: inode_lock include/linux/fs.h:748 [inline] #1: ffff88806d5a92d8 (&sb->s_type->i_mutex_key#21){++++}-{3:3}, at: chown_common+0x32b/0x5e0 fs/open.c:677 2 locks held by syz-executor.4/4245: #0: ffff8880758ba368 (&f->f_pos_lock){+.+.}-{3:3}, at: __fdget_pos+0x96/0xb0 fs/file.c:1063 #1: ffff88806d7412d8 (&sb->s_type->i_mutex_key#21){++++}-{3:3}, at: iterate_dir+0xad/0x6c0 fs/readdir.c:55 2 locks held by syz-executor.4/4246: #0: ffff88801f27a460 (sb_writers#14){.+.+}-{0:0}, at: do_fchownat+0xb8/0x140 fs/open.c:708 #1: ffff88806d7412d8 (&sb->s_type->i_mutex_key#21){++++}-{3:3}, at: inode_lock include/linux/fs.h:748 [inline] #1: ffff88806d7412d8 (&sb->s_type->i_mutex_key#21){++++}-{3:3}, at: chown_common+0x32b/0x5e0 fs/open.c:677 2 locks held by syz-executor.3/4421: 2 locks held by syz-executor.3/4424: #0: ffff888073c64460 (sb_writers#14){.+.+}-{0:0}, at: do_fchownat+0xb8/0x140 fs/open.c:708 #1: ffff88806d5a8150 (&sb->s_type->i_mutex_key#21){++++}-{3:3}, at: inode_lock include/linux/fs.h:748 [inline] #1: ffff88806d5a8150 (&sb->s_type->i_mutex_key#21){++++}-{3:3}, at: chown_common+0x32b/0x5e0 fs/open.c:677 2 locks held by syz-executor.2/4426: #0: ffff88802291b768 (&f->f_pos_lock){+.+.}-{3:3}, at: __fdget_pos+0x96/0xb0 fs/file.c:1063 #1: ffff88806d5a98b0 (&sb->s_type->i_mutex_key#21){++++}-{3:3}, at: iterate_dir+0xad/0x6c0 fs/readdir.c:55 2 locks held by syz-executor.2/4429: #0: ffff88807aa3c460 (sb_writers#14){.+.+}-{0:0}, at: do_fchownat+0xb8/0x140 fs/open.c:708 #1: ffff88806d5a98b0 (&sb->s_type->i_mutex_key#21){++++}-{3:3}, at: inode_lock include/linux/fs.h:748 [inline] #1: ffff88806d5a98b0 (&sb->s_type->i_mutex_key#21){++++}-{3:3}, at: chown_common+0x32b/0x5e0 fs/open.c:677 2 locks held by syz-executor.0/4476: 2 locks held by syz-executor.0/4479: #0: ffff8880772e8460 (sb_writers#14){.+.+}-{0:0}, at: do_fchownat+0xb8/0x140 fs/open.c:708 #1: ffff88806d742460 (&sb->s_type->i_mutex_key#21){++++}-{3:3}, at: inode_lock include/linux/fs.h:748 [inline] #1: ffff88806d742460 (&sb->s_type->i_mutex_key#21){++++}-{3:3}, at: chown_common+0x32b/0x5e0 fs/open.c:677 ============================================= NMI backtrace for cpu 0 CPU: 0 PID: 28 Comm: khungtaskd Not tainted 5.18.0-rc6-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+0x57/0x7d lib/dump_stack.c:106 nmi_cpu_backtrace.cold+0x30/0xc0 lib/nmi_backtrace.c:111 nmi_trigger_cpumask_backtrace+0x18f/0x1d0 lib/nmi_backtrace.c:62 trigger_all_cpu_backtrace include/linux/nmi.h:146 [inline] check_hung_uninterruptible_tasks kernel/hung_task.c:212 [inline] watchdog+0x88c/0xbf0 kernel/hung_task.c:369 kthread+0x299/0x340 kernel/kthread.c:376 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:298 Sending NMI from CPU 0 to CPUs 1: NMI backtrace for cpu 1 CPU: 1 PID: 91 Comm: kworker/u4:3 Not tainted 5.18.0-rc6-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Workqueue: events_unbound toggle_allocation_gate RIP: 0010:bytes_is_nonzero mm/kasan/generic.c:85 [inline] RIP: 0010:memory_is_nonzero mm/kasan/generic.c:102 [inline] RIP: 0010:memory_is_poisoned_n mm/kasan/generic.c:128 [inline] RIP: 0010:memory_is_poisoned mm/kasan/generic.c:159 [inline] RIP: 0010:check_region_inline mm/kasan/generic.c:180 [inline] RIP: 0010:kasan_check_range+0xde/0x180 mm/kasan/generic.c:189 Code: 74 f2 48 89 c2 b8 01 00 00 00 48 85 d2 75 56 5b 5d 41 5c c3 48 85 d2 74 5e 48 01 ea eb 09 48 83 c0 01 48 39 d0 74 50 80 38 00 <74> f2 eb d4 41 bc 08 00 00 00 48 89 ea 45 29 dc 4d 8d 1c 2c eb 0c RSP: 0018:ffffc90001c4f838 EFLAGS: 00000046 RAX: fffffbfff1dd0122 RBX: fffffbfff1dd0123 RCX: ffffffff8154716e RDX: fffffbfff1dd0123 RSI: 0000000000000008 RDI: ffffffff8ee80910 RBP: fffffbfff1dd0122 R08: 0000000000000000 R09: ffffffff8ee80917 R10: fffffbfff1dd0122 R11: 0000000000000001 R12: ffff8880174f6248 R13: 0000000000000006 R14: 00000000000000b0 R15: ffff8880174f6268 FS: 0000000000000000(0000) GS:ffff8880b9f00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 000055bb57f2a168 CR3: 000000000aa8e000 CR4: 00000000003506e0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: instrument_atomic_read include/linux/instrumented.h:71 [inline] test_bit include/asm-generic/bitops/instrumented-non-atomic.h:134 [inline] hlock_class kernel/locking/lockdep.c:197 [inline] mark_lock.part.0+0xee/0x19a0 kernel/locking/lockdep.c:4585 mark_lock kernel/locking/lockdep.c:4571 [inline] mark_held_locks+0x9f/0xe0 kernel/locking/lockdep.c:4208 __trace_hardirqs_on_caller kernel/locking/lockdep.c:4234 [inline] lockdep_hardirqs_on_prepare kernel/locking/lockdep.c:4294 [inline] lockdep_hardirqs_on_prepare+0x28b/0x400 kernel/locking/lockdep.c:4246 trace_hardirqs_on+0x1c/0x140 kernel/trace/trace_preemptirq.c:49 __text_poke+0x6e1/0x8c0 arch/x86/kernel/alternative.c:1096 text_poke arch/x86/kernel/alternative.c:1121 [inline] text_poke_bp_batch+0x39a/0x6c0 arch/x86/kernel/alternative.c:1385 text_poke_flush arch/x86/kernel/alternative.c:1542 [inline] text_poke_flush arch/x86/kernel/alternative.c:1539 [inline] text_poke_finish+0x16/0x30 arch/x86/kernel/alternative.c:1549 arch_jump_label_transform_apply+0x13/0x20 arch/x86/kernel/jump_label.c:146 static_key_enable_cpuslocked+0x15f/0x220 kernel/jump_label.c:177 static_key_enable+0x11/0x20 kernel/jump_label.c:190 toggle_allocation_gate mm/kfence/core.c:764 [inline] toggle_allocation_gate+0xe3/0x310 mm/kfence/core.c:756 process_one_work+0x841/0x13a0 kernel/workqueue.c:2289 worker_thread+0x598/0xec0 kernel/workqueue.c:2436 kthread+0x299/0x340 kernel/kthread.c:376 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:298 ---------------- Code disassembly (best guess): 0: 74 f2 je 0xfffffff4 2: 48 89 c2 mov %rax,%rdx 5: b8 01 00 00 00 mov $0x1,%eax a: 48 85 d2 test %rdx,%rdx d: 75 56 jne 0x65 f: 5b pop %rbx 10: 5d pop %rbp 11: 41 5c pop %r12 13: c3 retq 14: 48 85 d2 test %rdx,%rdx 17: 74 5e je 0x77 19: 48 01 ea add %rbp,%rdx 1c: eb 09 jmp 0x27 1e: 48 83 c0 01 add $0x1,%rax 22: 48 39 d0 cmp %rdx,%rax 25: 74 50 je 0x77 27: 80 38 00 cmpb $0x0,(%rax) * 2a: 74 f2 je 0x1e <-- trapping instruction 2c: eb d4 jmp 0x2 2e: 41 bc 08 00 00 00 mov $0x8,%r12d 34: 48 89 ea mov %rbp,%rdx 37: 45 29 dc sub %r11d,%r12d 3a: 4d 8d 1c 2c lea (%r12,%rbp,1),%r11 3e: eb 0c jmp 0x4c