bisecting fixing commit since 3207316b3beec7e38e5dbe2f463df0cec71e0b97 building syzkaller on 79264ae39c1ef4b4875ab67d6f0c8c3e75aa6a34 testing commit 3207316b3beec7e38e5dbe2f463df0cec71e0b97 with gcc (GCC) 8.4.1 20210217 kernel signature: ecab0bf5f3d5ba2dcd7de7fd754bd141ac6728f9caabc56ebeef293a230807a4 run #0: crashed: INFO: task hung in vfs_setxattr run #1: crashed: INFO: task hung in vfs_setxattr run #2: crashed: INFO: task hung in vfs_setxattr run #3: crashed: INFO: task hung in vfs_setxattr run #4: crashed: INFO: task hung in vfs_setxattr run #5: crashed: INFO: task hung in vfs_setxattr run #6: crashed: INFO: task hung in vfs_setxattr run #7: crashed: INFO: task hung in vfs_setxattr run #8: crashed: INFO: task hung in vfs_setxattr run #9: crashed: INFO: task hung in vfs_setxattr run #10: crashed: INFO: task hung in vfs_setxattr run #11: crashed: INFO: task hung in vfs_setxattr run #12: crashed: INFO: task hung in vfs_setxattr run #13: crashed: INFO: task hung in vfs_setxattr run #14: crashed: INFO: task hung in do_task_dead run #15: crashed: INFO: task hung in vfs_setxattr run #16: crashed: INFO: task hung in vfs_setxattr run #17: crashed: INFO: task hung in vfs_setxattr run #18: crashed: INFO: task hung in vfs_setxattr run #19: crashed: INFO: task hung in vfs_setxattr testing current HEAD 3c8c23092588a23bf1856a64f58c37f477a413be testing commit 3c8c23092588a23bf1856a64f58c37f477a413be with gcc (GCC) 8.4.1 20210217 kernel signature: fa2d4d4b3dd6a9e06f8e8db092eceeeefde88a4c1ccbecc322c4667720f22491 all runs: crashed: INFO: task hung in vfs_setxattr revisions tested: 2, total time: 37m23.768007066s (build: 24m38.085744344s, test: 11m55.492085367s) the crash still happens on HEAD commit msg: Linux 4.19.190 crash: INFO: task hung in vfs_setxattr Bluetooth: hci1: command 0x0406 tx timeout Bluetooth: hci0: command 0x0406 tx timeout Bluetooth: hci2: command 0x0406 tx timeout Bluetooth: hci3: command 0x0406 tx timeout Bluetooth: hci4: command 0x0406 tx timeout INFO: task syz-executor.3:9905 blocked for more than 140 seconds. Not tainted 4.19.190-syzkaller #0 "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message. syz-executor.3 D29528 9905 8466 0x00000004 Call Trace: context_switch kernel/sched/core.c:2828 [inline] __schedule+0x80c/0x1f70 kernel/sched/core.c:3517 schedule+0x7f/0x1b0 kernel/sched/core.c:3561 __rwsem_down_write_failed_common kernel/locking/rwsem-xadd.c:589 [inline] rwsem_down_write_failed+0x3bb/0x780 kernel/locking/rwsem-xadd.c:618 call_rwsem_down_write_failed+0x17/0x30 arch/x86/lib/rwsem.S:117 __down_write arch/x86/include/asm/rwsem.h:142 [inline] down_write+0x53/0x90 kernel/locking/rwsem.c:72 inode_lock include/linux/fs.h:748 [inline] vfs_setxattr+0xd6/0x280 fs/xattr.c:254 setxattr+0x1af/0x280 fs/xattr.c:520 __do_sys_fsetxattr fs/xattr.c:575 [inline] __se_sys_fsetxattr+0xff/0x160 fs/xattr.c:564 __x64_sys_fsetxattr+0xb9/0x140 fs/xattr.c:564 do_syscall_64+0xd0/0x4e0 arch/x86/entry/common.c:293 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x465b09 Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 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 bc ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007f534008a188 EFLAGS: 00000246 ORIG_RAX: 00000000000000be RAX: ffffffffffffffda RBX: 000000000056c008 RCX: 0000000000465b09 RDX: 0000000000000000 RSI: 0000000020000180 RDI: 0000000000000005 RBP: 00000000004b069f R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 000000000056c008 R13: 00007ffdb728eb1f R14: 00007f534008a300 R15: 0000000000022000 INFO: task syz-executor.0:9922 blocked for more than 140 seconds. Not tainted 4.19.190-syzkaller #0 "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message. syz-executor.0 D29752 9922 8468 0x00000004 Call Trace: context_switch kernel/sched/core.c:2828 [inline] __schedule+0x80c/0x1f70 kernel/sched/core.c:3517 schedule+0x7f/0x1b0 kernel/sched/core.c:3561 __rwsem_down_write_failed_common kernel/locking/rwsem-xadd.c:589 [inline] rwsem_down_write_failed+0x3bb/0x780 kernel/locking/rwsem-xadd.c:618 call_rwsem_down_write_failed+0x17/0x30 arch/x86/lib/rwsem.S:117 __down_write arch/x86/include/asm/rwsem.h:142 [inline] down_write+0x53/0x90 kernel/locking/rwsem.c:72 inode_lock include/linux/fs.h:748 [inline] vfs_setxattr+0xd6/0x280 fs/xattr.c:254 setxattr+0x1af/0x280 fs/xattr.c:520 __do_sys_fsetxattr fs/xattr.c:575 [inline] __se_sys_fsetxattr+0xff/0x160 fs/xattr.c:564 __x64_sys_fsetxattr+0xb9/0x140 fs/xattr.c:564 do_syscall_64+0xd0/0x4e0 arch/x86/entry/common.c:293 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x465b09 Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 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 bc ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007fcb60a31188 EFLAGS: 00000246 ORIG_RAX: 00000000000000be RAX: ffffffffffffffda RBX: 000000000056c008 RCX: 0000000000465b09 RDX: 0000000000000000 RSI: 0000000020000180 RDI: 0000000000000005 RBP: 00000000004b069f R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 000000000056c008 R13: 00007ffe9e0f95bf R14: 00007fcb60a31300 R15: 0000000000022000 INFO: task syz-executor.2:9966 blocked for more than 140 seconds. Not tainted 4.19.190-syzkaller #0 "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message. syz-executor.2 D29752 9966 8464 0x00000004 Call Trace: context_switch kernel/sched/core.c:2828 [inline] __schedule+0x80c/0x1f70 kernel/sched/core.c:3517 schedule+0x7f/0x1b0 kernel/sched/core.c:3561 __rwsem_down_write_failed_common kernel/locking/rwsem-xadd.c:589 [inline] rwsem_down_write_failed+0x3bb/0x780 kernel/locking/rwsem-xadd.c:618 call_rwsem_down_write_failed+0x17/0x30 arch/x86/lib/rwsem.S:117 __down_write arch/x86/include/asm/rwsem.h:142 [inline] down_write+0x53/0x90 kernel/locking/rwsem.c:72 inode_lock include/linux/fs.h:748 [inline] vfs_setxattr+0xd6/0x280 fs/xattr.c:254 setxattr+0x1af/0x280 fs/xattr.c:520 __do_sys_fsetxattr fs/xattr.c:575 [inline] __se_sys_fsetxattr+0xff/0x160 fs/xattr.c:564 __x64_sys_fsetxattr+0xb9/0x140 fs/xattr.c:564 do_syscall_64+0xd0/0x4e0 arch/x86/entry/common.c:293 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x465b09 Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 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 bc ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007fc66e402188 EFLAGS: 00000246 ORIG_RAX: 00000000000000be RAX: ffffffffffffffda RBX: 000000000056c008 RCX: 0000000000465b09 RDX: 0000000000000000 RSI: 0000000020000180 RDI: 0000000000000005 RBP: 00000000004b069f R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 000000000056c008 R13: 00007ffcab0a561f R14: 00007fc66e402300 R15: 0000000000022000 INFO: task syz-executor.1:9970 blocked for more than 140 seconds. Not tainted 4.19.190-syzkaller #0 "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message. syz-executor.1 D29192 9970 8471 0x00000004 Call Trace: context_switch kernel/sched/core.c:2828 [inline] __schedule+0x80c/0x1f70 kernel/sched/core.c:3517 schedule+0x7f/0x1b0 kernel/sched/core.c:3561 __rwsem_down_write_failed_common kernel/locking/rwsem-xadd.c:589 [inline] rwsem_down_write_failed+0x3bb/0x780 kernel/locking/rwsem-xadd.c:618 call_rwsem_down_write_failed+0x17/0x30 arch/x86/lib/rwsem.S:117 __down_write arch/x86/include/asm/rwsem.h:142 [inline] down_write+0x53/0x90 kernel/locking/rwsem.c:72 inode_lock include/linux/fs.h:748 [inline] vfs_setxattr+0xd6/0x280 fs/xattr.c:254 setxattr+0x1af/0x280 fs/xattr.c:520 __do_sys_fsetxattr fs/xattr.c:575 [inline] __se_sys_fsetxattr+0xff/0x160 fs/xattr.c:564 __x64_sys_fsetxattr+0xb9/0x140 fs/xattr.c:564 do_syscall_64+0xd0/0x4e0 arch/x86/entry/common.c:293 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x465b09 Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 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 bc ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007fa57657b188 EFLAGS: 00000246 ORIG_RAX: 00000000000000be RAX: ffffffffffffffda RBX: 000000000056c008 RCX: 0000000000465b09 RDX: 0000000000000000 RSI: 0000000020000180 RDI: 0000000000000005 RBP: 00000000004b069f R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 000000000056c008 R13: 00007ffebbdb63cf R14: 00007fa57657b300 R15: 0000000000022000 INFO: task syz-executor.5:9971 blocked for more than 140 seconds. Not tainted 4.19.190-syzkaller #0 "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message. syz-executor.5 D29752 9971 8474 0x00000004 Call Trace: context_switch kernel/sched/core.c:2828 [inline] __schedule+0x80c/0x1f70 kernel/sched/core.c:3517 schedule+0x7f/0x1b0 kernel/sched/core.c:3561 __rwsem_down_write_failed_common kernel/locking/rwsem-xadd.c:589 [inline] rwsem_down_write_failed+0x3bb/0x780 kernel/locking/rwsem-xadd.c:618 call_rwsem_down_write_failed+0x17/0x30 arch/x86/lib/rwsem.S:117 __down_write arch/x86/include/asm/rwsem.h:142 [inline] down_write+0x53/0x90 kernel/locking/rwsem.c:72 inode_lock include/linux/fs.h:748 [inline] vfs_setxattr+0xd6/0x280 fs/xattr.c:254 setxattr+0x1af/0x280 fs/xattr.c:520 trace_hardirqs_on+0x28/0x190 kernel/trace/trace_preemptirq.c:30 exit_to_usermode_loop+0x159/0x1e0 arch/x86/entry/common.c:163 prepare_exit_to_usermode arch/x86/entry/common.c:198 [inline] syscall_return_slowpath arch/x86/entry/common.c:271 [inline] do_syscall_64+0x413/0x4e0 arch/x86/entry/common.c:296 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x465b09 Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 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 bc ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007f99de41e188 EFLAGS: 00000246 ORIG_RAX: 00000000000000be RAX: ffffffffffffffa1 RBX: 000000000056c008 RCX: 0000000000465b09 RDX: 0000000000000000 RSI: 0000000020000180 RDI: 0000000000000005 RBP: 00000000004b069f R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 000000000056c008 R13: 00007ffd365782ff R14: 00007f99de41e300 R15: 0000000000022000 INFO: task syz-executor.4:9988 blocked for more than 140 seconds. Not tainted 4.19.190-syzkaller #0 "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message. syz-executor.4 D29752 9988 8473 0x00000004 Call Trace: context_switch kernel/sched/core.c:2828 [inline] __schedule+0x80c/0x1f70 kernel/sched/core.c:3517 schedule+0x7f/0x1b0 kernel/sched/core.c:3561 __rwsem_down_write_failed_common kernel/locking/rwsem-xadd.c:589 [inline] rwsem_down_write_failed+0x3bb/0x780 kernel/locking/rwsem-xadd.c:618 call_rwsem_down_write_failed+0x17/0x30 arch/x86/lib/rwsem.S:117 __down_write arch/x86/include/asm/rwsem.h:142 [inline] down_write+0x53/0x90 kernel/locking/rwsem.c:72 inode_lock include/linux/fs.h:748 [inline] vfs_setxattr+0xd6/0x280 fs/xattr.c:254 setxattr+0x1af/0x280 fs/xattr.c:520 __do_sys_fsetxattr fs/xattr.c:575 [inline] __se_sys_fsetxattr+0xff/0x160 fs/xattr.c:564 __x64_sys_fsetxattr+0xb9/0x140 fs/xattr.c:564 do_syscall_64+0xd0/0x4e0 arch/x86/entry/common.c:293 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x465b09 Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 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 bc ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007eff8f038188 EFLAGS: 00000246 ORIG_RAX: 00000000000000be RAX: ffffffffffffffda RBX: 000000000056c008 RCX: 0000000000465b09 RDX: 0000000000000000 RSI: 0000000020000180 RDI: 0000000000000005 RBP: 00000000004b069f R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 000000000056c008 R13: 00007ffd3bbd9c5f R14: 00007eff8f038300 R15: 0000000000022000 Showing all locks held in the system: 1 lock held by khungtaskd/1569: #0: 00000000f3c0327d (rcu_read_lock){....}, at: debug_show_all_locks+0x5b/0x27a kernel/locking/lockdep.c:4443 1 lock held by kswapd0/1967: 1 lock held by in:imklog/7748: #0: 00000000afb38479 (&f->f_pos_lock){+.+.}, at: __fdget_pos+0xa7/0xd0 fs/file.c:767 3 locks held by syz-executor.3/9905: 3 locks held by syz-executor.0/9909: 2 locks held by syz-executor.0/9922: #0: 0000000021f03a21 (sb_writers#14){.+.+}, at: sb_start_write include/linux/fs.h:1579 [inline] #0: 0000000021f03a21 (sb_writers#14){.+.+}, at: mnt_want_write_file+0x67/0x110 fs/namespace.c:418 #1: 00000000b601a1c4 (&type->i_mutex_dir_key#9){+.+.}, at: inode_lock include/linux/fs.h:748 [inline] #1: 00000000b601a1c4 (&type->i_mutex_dir_key#9){+.+.}, at: vfs_setxattr+0xd6/0x280 fs/xattr.c:254 1 lock held by syz-executor.2/9948: 3 locks held by syz-executor.1/9953: 2 locks held by syz-executor.1/9970: #0: 00000000e9e543da (sb_writers#14){.+.+}, at: sb_start_write include/linux/fs.h:1579 [inline] #0: 00000000e9e543da (sb_writers#14){.+.+}, at: mnt_want_write_file+0x67/0x110 fs/namespace.c:418 #1: 0000000070b2b3eb (&type->i_mutex_dir_key#9){+.+.}, at: inode_lock include/linux/fs.h:748 [inline] #1: 0000000070b2b3eb (&type->i_mutex_dir_key#9){+.+.}, at: vfs_setxattr+0xd6/0x280 fs/xattr.c:254 2 locks held by syz-executor.5/9954: 3 locks held by syz-executor.4/9982: 2 locks held by syz-executor.4/9988: #0: 000000006fc268cf (sb_writers#14){.+.+}, at: sb_start_write include/linux/fs.h:1579 [inline] #0: 000000006fc268cf (sb_writers#14){.+.+}, at: mnt_want_write_file+0x67/0x110 fs/namespace.c:418 #1: 00000000558e09a6 (&type->i_mutex_dir_key#9){+.+.}, at: inode_lock include/linux/fs.h:748 [inline] #1: 00000000558e09a6 (&type->i_mutex_dir_key#9){+.+.}, at: vfs_setxattr+0xd6/0x280 fs/xattr.c:254 ============================================= NMI backtrace for cpu 0 CPU: 0 PID: 1569 Comm: khungtaskd Not tainted 4.19.190-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0x17c/0x226 lib/dump_stack.c:118 nmi_cpu_backtrace.cold.0+0x3c/0x78 lib/nmi_backtrace.c:101 nmi_trigger_cpumask_backtrace+0xf6/0x120 lib/nmi_backtrace.c:62 arch_trigger_cpumask_backtrace+0x14/0x20 arch/x86/kernel/apic/hw_nmi.c:38 trigger_all_cpu_backtrace include/linux/nmi.h:146 [inline] check_hung_uninterruptible_tasks kernel/hung_task.c:203 [inline] watchdog+0x5c3/0xb40 kernel/hung_task.c:287 kthread+0x347/0x410 kernel/kthread.c:259 ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:415 Sending NMI from CPU 0 to CPUs 1: NMI backtrace for cpu 1 CPU: 1 PID: 18 Comm: ksoftirqd/1 Not tainted 4.19.190-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 RIP: 0010:__save_stack_trace+0x9c/0x100 arch/x86/kernel/stacktrace.c:46 Code: 2a ff ff ff 85 c0 75 27 48 8d bd 78 ff ff ff e8 9a 3e 06 00 8b 85 78 ff ff ff 85 c0 74 11 48 8d bd 78 ff ff ff e8 04 2c 06 00 <48> 85 c0 75 c7 8b 03 3b 43 04 73 11 48 8b 53 08 8d 48 01 89 0b 48 RSP: 0018:ffff8880b5a27968 EFLAGS: 00000046 RAX: ffffffff818b521c RBX: ffff8880b5a27a10 RCX: 0000000000000000 RDX: 1ffff11016b44f36 RSI: ffff8880b5a27a00 RDI: ffffffff818b521c RBP: ffff8880b5a279f0 R08: 1ffff11016b44f37 R09: ffff8880b5a279a0 R10: ffff8880b5a27918 R11: ffff8880b5a279c7 R12: 0000000000000000 R13: 0000000000000000 R14: ffff8880b5a1a4c0 R15: ffff88807a280460 FS: 0000000000000000(0000) GS:ffff8880ba300000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007f534008a9e0 CR3: 00000000b30ce000 CR4: 00000000001406e0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: save_stack_trace+0x1a/0x20 arch/x86/kernel/stacktrace.c:60 save_stack mm/kasan/kasan.c:448 [inline] set_track mm/kasan/kasan.c:460 [inline] __kasan_slab_free+0x13c/0x220 mm/kasan/kasan.c:521 kasan_slab_free+0xe/0x10 mm/kasan/kasan.c:528 __cache_free mm/slab.c:3503 [inline] kmem_cache_free+0x83/0x290 mm/slab.c:3765 radix_tree_node_rcu_free+0x79/0x90 lib/radix-tree.c:449 __rcu_reclaim kernel/rcu/rcu.h:236 [inline] rcu_do_batch kernel/rcu/tree.c:2584 [inline] invoke_rcu_callbacks kernel/rcu/tree.c:2897 [inline] __rcu_process_callbacks kernel/rcu/tree.c:2864 [inline] rcu_process_callbacks+0x93a/0x19b0 kernel/rcu/tree.c:2881 __do_softirq+0x25f/0x919 kernel/softirq.c:292 run_ksoftirqd+0x5e/0x100 kernel/softirq.c:653 smpboot_thread_fn+0x55f/0x8a0 kernel/smpboot.c:164 kthread+0x347/0x410 kernel/kthread.c:259 ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:415