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: ab02d5008d8fec770bd41c5c35404da0862767c3c32e459c8588c11c7a04faa7 run #0: crashed: INFO: task hung in chown_common 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 corrupted run #8: crashed: INFO: task hung in chown_common run #9: crashed: INFO: task hung in chown_common run #10: crashed: INFO: task hung in chown_common run #11: crashed: INFO: task hung in chown_common run #12: crashed: INFO: task hung in chown_common run #13: crashed: INFO: task hung in chown_common run #14: crashed: INFO: task hung in chown_common run #15: crashed: INFO: task hung in chown_common run #16: crashed: INFO: task hung in chown_common run #17: crashed: INFO: task hung in chown_common run #18: crashed: INFO: task hung in chown_common run #19: crashed: INFO: task hung in chown_common testing current HEAD 5a29232d870d9e63fe5ff30b081be6ea7cc2465d testing commit 5a29232d870d9e63fe5ff30b081be6ea7cc2465d compiler: gcc (GCC) 10.2.1 20210217, GNU ld (GNU Binutils for Debian) 2.35.2 kernel signature: 8b8901d7beabeb2fa6fae1863da2a70ea0f4e7abc722f334157f5357dcb516c3 run #0: crashed: INFO: rcu detected stall in corrupted run #1: crashed: INFO: rcu detected stall in corrupted run #2: crashed: INFO: rcu detected stall in corrupted run #3: crashed: INFO: rcu detected stall in corrupted run #4: crashed: INFO: rcu detected stall in corrupted 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: 27m14.769271082s (build: 12m40.704046881s, test: 13m49.857964763s) the crash still happens on HEAD commit msg: Merge tag 'for-5.19-rc6-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux crash: INFO: task hung in chown_common INFO: task syz-executor.0:4188 blocked for more than 143 seconds. Not tainted 5.19.0-rc6-syzkaller #0 "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message. task:syz-executor.0 state:D stack:29824 pid: 4188 ppid: 4074 flags:0x00000004 Call Trace: context_switch kernel/sched/core.c:5146 [inline] __schedule+0x9cd/0x4b20 kernel/sched/core.c:6458 schedule+0xd2/0x1f0 kernel/sched/core.c:6530 rwsem_down_write_slowpath+0x68a/0x11a0 kernel/locking/rwsem.c:1172 __down_write_common kernel/locking/rwsem.c:1287 [inline] __down_write_common kernel/locking/rwsem.c:1284 [inline] __down_write kernel/locking/rwsem.c:1296 [inline] down_write+0x135/0x150 kernel/locking/rwsem.c:1543 inode_lock include/linux/fs.h:741 [inline] chown_common+0x32b/0x5e0 fs/open.c:701 do_fchownat+0xcf/0x140 fs/open.c:735 __do_sys_chown fs/open.c:755 [inline] __se_sys_chown fs/open.c:753 [inline] __x64_sys_chown+0x72/0xb0 fs/open.c:753 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+0x46/0xb0 RIP: 0033:0x7f1b6fc89049 RSP: 002b:00007f1b6f3fe168 EFLAGS: 00000246 ORIG_RAX: 000000000000005c RAX: ffffffffffffffda RBX: 00007f1b6fd9c030 RCX: 00007f1b6fc89049 RDX: 000000000000ee00 RSI: 000000000000ee00 RDI: 0000000020000040 RBP: 00007f1b6fce308d R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007ffd37bdcdef R14: 00007f1b6f3fe300 R15: 0000000000022000 INFO: task syz-executor.1:4189 blocked for more than 144 seconds. Not tainted 5.19.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: 4189 ppid: 4070 flags:0x00000004 Call Trace: context_switch kernel/sched/core.c:5146 [inline] __schedule+0x9cd/0x4b20 kernel/sched/core.c:6458 schedule+0xd2/0x1f0 kernel/sched/core.c:6530 rwsem_down_write_slowpath+0x68a/0x11a0 kernel/locking/rwsem.c:1172 __down_write_common kernel/locking/rwsem.c:1287 [inline] __down_write_common kernel/locking/rwsem.c:1284 [inline] __down_write kernel/locking/rwsem.c:1296 [inline] down_write+0x135/0x150 kernel/locking/rwsem.c:1543 inode_lock include/linux/fs.h:741 [inline] chown_common+0x32b/0x5e0 fs/open.c:701 do_fchownat+0xcf/0x140 fs/open.c:735 __do_sys_chown fs/open.c:755 [inline] __se_sys_chown fs/open.c:753 [inline] __x64_sys_chown+0x72/0xb0 fs/open.c:753 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+0x46/0xb0 RIP: 0033:0x7f99dce89049 RSP: 002b:00007f99ddfe0168 EFLAGS: 00000246 ORIG_RAX: 000000000000005c RAX: ffffffffffffffda RBX: 00007f99dcf9c030 RCX: 00007f99dce89049 RDX: 000000000000ee00 RSI: 000000000000ee00 RDI: 0000000020000040 RBP: 00007f99dcee308d R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007ffc0cfae03f R14: 00007f99ddfe0300 R15: 0000000000022000 INFO: task syz-executor.5:4193 blocked for more than 145 seconds. Not tainted 5.19.0-rc6-syzkaller #0 "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message. task:syz-executor.5 state:D stack:29400 pid: 4193 ppid: 4077 flags:0x00000004 Call Trace: context_switch kernel/sched/core.c:5146 [inline] __schedule+0x9cd/0x4b20 kernel/sched/core.c:6458 schedule+0xd2/0x1f0 kernel/sched/core.c:6530 rwsem_down_write_slowpath+0x68a/0x11a0 kernel/locking/rwsem.c:1172 __down_write_common kernel/locking/rwsem.c:1287 [inline] __down_write_common kernel/locking/rwsem.c:1284 [inline] __down_write kernel/locking/rwsem.c:1296 [inline] down_write+0x135/0x150 kernel/locking/rwsem.c:1543 inode_lock include/linux/fs.h:741 [inline] chown_common+0x32b/0x5e0 fs/open.c:701 do_fchownat+0xcf/0x140 fs/open.c:735 __do_sys_chown fs/open.c:755 [inline] __se_sys_chown fs/open.c:753 [inline] __x64_sys_chown+0x72/0xb0 fs/open.c:753 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+0x46/0xb0 RIP: 0033:0x7f6427889049 RSP: 002b:00007f6428a9f168 EFLAGS: 00000246 ORIG_RAX: 000000000000005c RAX: ffffffffffffffda RBX: 00007f642799c030 RCX: 00007f6427889049 RDX: 000000000000ee00 RSI: 000000000000ee00 RDI: 0000000020000040 RBP: 00007f64278e308d R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007ffcbce8f33f R14: 00007f6428a9f300 R15: 0000000000022000 INFO: task syz-executor.2:4201 blocked for more than 146 seconds. Not tainted 5.19.0-rc6-syzkaller #0 "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message. task:syz-executor.2 state:D stack:29648 pid: 4201 ppid: 4069 flags:0x00004004 Call Trace: context_switch kernel/sched/core.c:5146 [inline] __schedule+0x9cd/0x4b20 kernel/sched/core.c:6458 schedule+0xd2/0x1f0 kernel/sched/core.c:6530 rwsem_down_write_slowpath+0x68a/0x11a0 kernel/locking/rwsem.c:1172 __down_write_common kernel/locking/rwsem.c:1287 [inline] __down_write_common kernel/locking/rwsem.c:1284 [inline] __down_write kernel/locking/rwsem.c:1296 [inline] down_write+0x135/0x150 kernel/locking/rwsem.c:1543 inode_lock include/linux/fs.h:741 [inline] chown_common+0x32b/0x5e0 fs/open.c:701 do_fchownat+0xcf/0x140 fs/open.c:735 __do_sys_chown fs/open.c:755 [inline] __se_sys_chown fs/open.c:753 [inline] __x64_sys_chown+0x72/0xb0 fs/open.c:753 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+0x46/0xb0 RIP: 0033:0x7f2568289049 RSP: 002b:00007f2569346168 EFLAGS: 00000246 ORIG_RAX: 000000000000005c RAX: ffffffffffffffda RBX: 00007f256839c030 RCX: 00007f2568289049 RDX: 000000000000ee00 RSI: 000000000000ee00 RDI: 0000000020000040 RBP: 00007f25682e308d R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007fffa63d571f R14: 00007f2569346300 R15: 0000000000022000 INFO: task syz-executor.4:4202 blocked for more than 147 seconds. Not tainted 5.19.0-rc6-syzkaller #0 "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message. task:syz-executor.4 state:D stack:29776 pid: 4202 ppid: 4073 flags:0x00000004 Call Trace: context_switch kernel/sched/core.c:5146 [inline] __schedule+0x9cd/0x4b20 kernel/sched/core.c:6458 schedule+0xd2/0x1f0 kernel/sched/core.c:6530 rwsem_down_write_slowpath+0x68a/0x11a0 kernel/locking/rwsem.c:1172 __down_write_common kernel/locking/rwsem.c:1287 [inline] __down_write_common kernel/locking/rwsem.c:1284 [inline] __down_write kernel/locking/rwsem.c:1296 [inline] down_write+0x135/0x150 kernel/locking/rwsem.c:1543 inode_lock include/linux/fs.h:741 [inline] chown_common+0x32b/0x5e0 fs/open.c:701 do_fchownat+0xcf/0x140 fs/open.c:735 __do_sys_chown fs/open.c:755 [inline] __se_sys_chown fs/open.c:753 [inline] __x64_sys_chown+0x72/0xb0 fs/open.c:753 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+0x46/0xb0 RIP: 0033:0x7f04f6c89049 RSP: 002b:00007f04f7e4a168 EFLAGS: 00000246 ORIG_RAX: 000000000000005c RAX: ffffffffffffffda RBX: 00007f04f6d9c030 RCX: 00007f04f6c89049 RDX: 000000000000ee00 RSI: 000000000000ee00 RDI: 0000000020000040 RBP: 00007f04f6ce308d R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007ffd2352cc9f R14: 00007f04f7e4a300 R15: 0000000000022000 INFO: task syz-executor.3:4206 blocked for more than 148 seconds. Not tainted 5.19.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: 4206 ppid: 4075 flags:0x00000004 Call Trace: context_switch kernel/sched/core.c:5146 [inline] __schedule+0x9cd/0x4b20 kernel/sched/core.c:6458 schedule+0xd2/0x1f0 kernel/sched/core.c:6530 rwsem_down_write_slowpath+0x68a/0x11a0 kernel/locking/rwsem.c:1172 __down_write_common kernel/locking/rwsem.c:1287 [inline] __down_write_common kernel/locking/rwsem.c:1284 [inline] __down_write kernel/locking/rwsem.c:1296 [inline] down_write+0x135/0x150 kernel/locking/rwsem.c:1543 inode_lock include/linux/fs.h:741 [inline] chown_common+0x32b/0x5e0 fs/open.c:701 do_fchownat+0xcf/0x140 fs/open.c:735 __do_sys_chown fs/open.c:755 [inline] __se_sys_chown fs/open.c:753 [inline] __x64_sys_chown+0x72/0xb0 fs/open.c:753 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+0x46/0xb0 RIP: 0033:0x7f796ca89049 RSP: 002b:00007f796db85168 EFLAGS: 00000246 ORIG_RAX: 000000000000005c RAX: ffffffffffffffda RBX: 00007f796cb9c030 RCX: 00007f796ca89049 RDX: 000000000000ee00 RSI: 000000000000ee00 RDI: 0000000020000040 RBP: 00007f796cae308d R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007ffe905ec82f R14: 00007f796db85300 R15: 0000000000022000 Showing all locks held in the system: 1 lock held by ksoftirqd/0/15: 1 lock held by khungtaskd/27: #0: ffffffff8ad7b4e0 (rcu_read_lock){....}-{1:2}, at: debug_show_all_locks+0x53/0x260 kernel/locking/lockdep.c:6491 2 locks held by getty/3280: #0: ffff88814a99d098 (&tty->ldisc_sem){++++}-{0:0}, at: tty_ldisc_ref_wait+0x1f/0x70 drivers/tty/tty_ldisc.c:244 #1: ffffc900029162e8 (&ldata->atomic_read_lock){+.+.}-{3:3}, at: n_tty_read+0xb14/0x1040 drivers/tty/n_tty.c:2124 2 locks held by kworker/0:6/3642: #0: ffff8880b9e39e18 (&rq->__lock){-.-.}-{2:2}, at: raw_spin_rq_lock_nested+0x2b/0x120 kernel/sched/core.c:544 #1: ffff8880b9e277c8 (&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.0/4186: 2 locks held by syz-executor.0/4188: #0: ffff88807dd02460 (sb_writers#14){.+.+}-{0:0}, at: do_fchownat+0xb8/0x140 fs/open.c:732 #1: ffff88806a430150 (&sb->s_type->i_mutex_key#21){++++}-{3:3}, at: inode_lock include/linux/fs.h:741 [inline] #1: ffff88806a430150 (&sb->s_type->i_mutex_key#21){++++}-{3:3}, at: chown_common+0x32b/0x5e0 fs/open.c:701 2 locks held by syz-executor.1/4187: 2 locks held by syz-executor.1/4189: #0: ffff888024cfe460 (sb_writers#14){.+.+}-{0:0}, at: do_fchownat+0xb8/0x140 fs/open.c:732 #1: ffff88806a430728 (&sb->s_type->i_mutex_key#21){++++}-{3:3}, at: inode_lock include/linux/fs.h:741 [inline] #1: ffff88806a430728 (&sb->s_type->i_mutex_key#21){++++}-{3:3}, at: chown_common+0x32b/0x5e0 fs/open.c:701 2 locks held by syz-executor.5/4191: 2 locks held by syz-executor.5/4193: #0: ffff88807d4e4460 (sb_writers#14){.+.+}-{0:0}, at: do_fchownat+0xb8/0x140 fs/open.c:732 #1: ffff88806a430d00 (&sb->s_type->i_mutex_key#21){++++}-{3:3}, at: inode_lock include/linux/fs.h:741 [inline] #1: ffff88806a430d00 (&sb->s_type->i_mutex_key#21){++++}-{3:3}, at: chown_common+0x32b/0x5e0 fs/open.c:701 2 locks held by syz-executor.2/4197: #0: ffff88807b39b9e8 (&f->f_pos_lock){+.+.}-{3:3}, at: __fdget_pos+0x96/0xb0 fs/file.c:1036 #1: ffff88806f270728 (&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/4201: #0: ffff888076b7e460 (sb_writers#14){.+.+}-{0:0}, at: do_fchownat+0xb8/0x140 fs/open.c:732 #1: ffff88806f270728 (&sb->s_type->i_mutex_key#21){++++}-{3:3}, at: inode_lock include/linux/fs.h:741 [inline] #1: ffff88806f270728 (&sb->s_type->i_mutex_key#21){++++}-{3:3}, at: chown_common+0x32b/0x5e0 fs/open.c:701 2 locks held by syz-executor.4/4199: #0: ffff888075ea1768 (&f->f_pos_lock){+.+.}-{3:3}, at: __fdget_pos+0x96/0xb0 fs/file.c:1036 #1: ffff88806f270d00 (&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/4202: #0: ffff88806b36a460 (sb_writers#14){.+.+}-{0:0}, at: do_fchownat+0xb8/0x140 fs/open.c:732 #1: ffff88806f270d00 (&sb->s_type->i_mutex_key#21){++++}-{3:3}, at: inode_lock include/linux/fs.h:741 [inline] #1: ffff88806f270d00 (&sb->s_type->i_mutex_key#21){++++}-{3:3}, at: chown_common+0x32b/0x5e0 fs/open.c:701 2 locks held by syz-executor.3/4205: #0: ffff8880218ee368 (&f->f_pos_lock){+.+.}-{3:3}, at: __fdget_pos+0x96/0xb0 fs/file.c:1036 #1: ffff88806f2712d8 (&sb->s_type->i_mutex_key#21){++++}-{3:3}, at: iterate_dir+0xad/0x6c0 fs/readdir.c:55 2 locks held by syz-executor.3/4206: #0: ffff88807da6a460 (sb_writers#14){.+.+}-{0:0}, at: do_fchownat+0xb8/0x140 fs/open.c:732 #1: ffff88806f2712d8 (&sb->s_type->i_mutex_key#21){++++}-{3:3}, at: inode_lock include/linux/fs.h:741 [inline] #1: ffff88806f2712d8 (&sb->s_type->i_mutex_key#21){++++}-{3:3}, at: chown_common+0x32b/0x5e0 fs/open.c:701 ============================================= NMI backtrace for cpu 1 CPU: 1 PID: 27 Comm: khungtaskd Not tainted 5.19.0-rc6-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 06/29/2022 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:302 Sending NMI from CPU 1 to CPUs 0: NMI backtrace for cpu 0 CPU: 0 PID: 918 Comm: kworker/0:2 Not tainted 5.19.0-rc6-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 06/29/2022 Workqueue: events p9_read_work RIP: 0010:cfs_rq_of kernel/sched/sched.h:1374 [inline] RIP: 0010:__clear_buddies_next kernel/sched/fair.c:4397 [inline] RIP: 0010:clear_buddies+0xdf/0x3e0 kernel/sched/fair.c:4422 Code: 89 f8 48 c1 e8 03 42 80 3c 28 00 0f 85 84 02 00 00 48 8b 5b 70 48 85 db 74 36 48 8d 7b 78 48 89 f8 48 c1 e8 03 42 80 3c 28 00 <0f> 85 0b 02 00 00 48 8b 6b 78 48 8d 7d 58 48 89 f8 48 c1 e8 03 42 RSP: 0018:ffffc900046f79b0 EFLAGS: 00000046 RAX: 1ffff1100d73af0f RBX: ffff88806b9d7800 RCX: 1ffff110037ed02a RDX: 1ffff110173c73e3 RSI: ffff88806b9d7800 RDI: ffff88806b9d7878 RBP: ffff8880b9e39ec0 R08: ffff8880b9e39ec0 R09: 0000000000000001 R10: 0000000000000002 R11: 0000000000000001 R12: ffff8880b9e39ec0 R13: dffffc0000000000 R14: 0000000000000001 R15: ffff88806b9d7800 FS: 0000000000000000(0000) GS:ffff8880b9e00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00005613ac1a9600 CR3: 0000000016588000 CR4: 00000000003506f0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: set_next_entity+0x19/0x5e0 kernel/sched/fair.c:4525 pick_next_task_fair+0x6ad/0xe20 kernel/sched/fair.c:7318 __pick_next_task kernel/sched/core.c:5768 [inline] pick_next_task kernel/sched/core.c:5843 [inline] __schedule+0x3af/0x4b20 kernel/sched/core.c:6422 preempt_schedule_common+0x45/0xc0 kernel/sched/core.c:6623 preempt_schedule_thunk+0x16/0x18 arch/x86/entry/thunk_64.S:35 __raw_spin_unlock include/linux/spinlock_api_smp.h:143 [inline] _raw_spin_unlock+0x36/0x40 kernel/locking/spinlock.c:186 spin_unlock include/linux/spinlock.h:389 [inline] p9_read_work+0x8f8/0x11c0 net/9p/trans_fd.c:377 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:302