bisecting fixing commit since 3207316b3beec7e38e5dbe2f463df0cec71e0b97 building syzkaller on 79264ae39c1ef4b4875ab67d6f0c8c3e75aa6a34 testing commit 3207316b3beec7e38e5dbe2f463df0cec71e0b97 compiler: gcc version 8.4.1 20210217 (GCC) kernel signature: 04d247595c154c16e9847fced8e70bf80cc20daec2511c0b574164df9b314636 all runs: crashed: INFO: task hung in vfs_setxattr testing current HEAD 6db10b4d5efdc38ff06dfdde28dc5477f754b0bd testing commit 6db10b4d5efdc38ff06dfdde28dc5477f754b0bd compiler: gcc version 8.4.1 20210217 (GCC) kernel signature: bf6d17bf1cb1f2c083dbd4c372352c79bc3bb64a943b188a76d04b6ed6a50cf3 all runs: crashed: INFO: task hung in vfs_setxattr revisions tested: 2, total time: 31m41.311313921s (build: 19m27.003697863s, test: 11m48.373235233s) the crash still happens on HEAD commit msg: Linux 4.19.209 crash: INFO: task hung in vfs_setxattr Bluetooth: hci5: command 0x0406 tx timeout Bluetooth: hci0: command 0x0406 tx timeout Bluetooth: hci4: command 0x0406 tx timeout Bluetooth: hci3: command 0x0406 tx timeout Bluetooth: hci1: command 0x0406 tx timeout INFO: task syz-executor.1:9835 blocked for more than 140 seconds. Not tainted 4.19.209-syzkaller #0 "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message. syz-executor.1 D29528 9835 8454 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:00007f5e13e11188 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: 00007ffee3960a3f R14: 00007f5e13e11300 R15: 0000000000022000 INFO: task syz-executor.0:9863 blocked for more than 140 seconds. Not tainted 4.19.209-syzkaller #0 "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message. syz-executor.0 D29752 9863 8463 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:00007ff7e80f1188 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: 00007ffc63926daf R14: 00007ff7e80f1300 R15: 0000000000022000 Showing all locks held in the system: 1 lock held by khungtaskd/1560: #0: 000000007f721410 (rcu_read_lock){....}, at: debug_show_all_locks+0x5b/0x27a kernel/locking/lockdep.c:4443 1 lock held by khugepaged/1578: 1 lock held by kswapd0/1969: 1 lock held by kswapd1/1970: 1 lock held by in:imklog/7784: #0: 00000000411483a9 (&f->f_pos_lock){+.+.}, at: __fdget_pos+0xa7/0xd0 fs/file.c:767 3 locks held by syz-executor.1/9821: 2 locks held by syz-executor.1/9835: #0: 000000004d1c8a80 (sb_writers#14){.+.+}, at: sb_start_write include/linux/fs.h:1579 [inline] #0: 000000004d1c8a80 (sb_writers#14){.+.+}, at: mnt_want_write_file+0x67/0x110 fs/namespace.c:418 #1: 00000000ddf0c8fb (&type->i_mutex_dir_key#9){+.+.}, at: inode_lock include/linux/fs.h:748 [inline] #1: 00000000ddf0c8fb (&type->i_mutex_dir_key#9){+.+.}, at: vfs_setxattr+0xd6/0x280 fs/xattr.c:254 3 locks held by syz-executor.0/9846: 2 locks held by syz-executor.0/9863: #0: 000000006ad8d2be (sb_writers#14){.+.+}, at: sb_start_write include/linux/fs.h:1579 [inline] #0: 000000006ad8d2be (sb_writers#14){.+.+}, at: mnt_want_write_file+0x67/0x110 fs/namespace.c:418 #1: 0000000096ec0b70 (&type->i_mutex_dir_key#9){+.+.}, at: inode_lock include/linux/fs.h:748 [inline] #1: 0000000096ec0b70 (&type->i_mutex_dir_key#9){+.+.}, at: vfs_setxattr+0xd6/0x280 fs/xattr.c:254 3 locks held by syz-executor.4/9927: 2 locks held by syz-executor.4/9936: #0: 0000000063e09b14 (sb_writers#14){.+.+}, at: sb_start_write include/linux/fs.h:1579 [inline] #0: 0000000063e09b14 (sb_writers#14){.+.+}, at: mnt_want_write_file+0x67/0x110 fs/namespace.c:418 #1: 00000000a3f16595 (&type->i_mutex_dir_key#9){+.+.}, at: inode_lock include/linux/fs.h:748 [inline] #1: 00000000a3f16595 (&type->i_mutex_dir_key#9){+.+.}, at: vfs_setxattr+0xd6/0x280 fs/xattr.c:254 4 locks held by syz-executor.3/9970: 2 locks held by syz-executor.3/9982: #0: 00000000df7ee744 (sb_writers#14){.+.+}, at: sb_start_write include/linux/fs.h:1579 [inline] #0: 00000000df7ee744 (sb_writers#14){.+.+}, at: mnt_want_write_file+0x67/0x110 fs/namespace.c:418 #1: 000000005e4b83b6 (&type->i_mutex_dir_key#9){+.+.}, at: inode_lock include/linux/fs.h:748 [inline] #1: 000000005e4b83b6 (&type->i_mutex_dir_key#9){+.+.}, at: vfs_setxattr+0xd6/0x280 fs/xattr.c:254 3 locks held by syz-executor.2/9971: 2 locks held by syz-executor.2/9985: #0: 00000000b03bd2d7 (sb_writers#14){.+.+}, at: sb_start_write include/linux/fs.h:1579 [inline] #0: 00000000b03bd2d7 (sb_writers#14){.+.+}, at: mnt_want_write_file+0x67/0x110 fs/namespace.c:418 #1: 00000000d847d89d (&type->i_mutex_dir_key#9){+.+.}, at: inode_lock include/linux/fs.h:748 [inline] #1: 00000000d847d89d (&type->i_mutex_dir_key#9){+.+.}, at: vfs_setxattr+0xd6/0x280 fs/xattr.c:254 3 locks held by syz-executor.5/9978: 2 locks held by syz-executor.5/9987: #0: 0000000028eb1288 (sb_writers#14){.+.+}, at: sb_start_write include/linux/fs.h:1579 [inline] #0: 0000000028eb1288 (sb_writers#14){.+.+}, at: mnt_want_write_file+0x67/0x110 fs/namespace.c:418 #1: 0000000028158ec8 (&type->i_mutex_dir_key#9){+.+.}, at: inode_lock include/linux/fs.h:748 [inline] #1: 0000000028158ec8 (&type->i_mutex_dir_key#9){+.+.}, at: vfs_setxattr+0xd6/0x280 fs/xattr.c:254 ============================================= NMI backtrace for cpu 1 CPU: 1 PID: 1560 Comm: khungtaskd Not tainted 4.19.209-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 1 to CPUs 0: NMI backtrace for cpu 0 CPU: 0 PID: 9796 Comm: kworker/u4:7 Not tainted 4.19.209-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Workqueue: phy6 ieee80211_iface_work RIP: 0010:__lock_acquire+0x291/0x47c0 kernel/locking/lockdep.c:3322 Code: 08 48 85 db 0f 84 1d ff ff ff 48 8d bb 38 01 00 00 be 04 00 00 00 44 89 84 24 80 00 00 00 e8 16 84 45 00 f0 ff 83 38 01 00 00 <49> 8d 86 80 08 00 00 44 8b 84 24 80 00 00 00 48 89 c2 48 89 44 24 RSP: 0018:ffff88809aa6f420 EFLAGS: 00000006 RAX: fffffbfff16bf232 RBX: ffffffff8b5f9050 RCX: ffffffff8146415a RDX: 0000000000000001 RSI: 0000000000000004 RDI: ffffffff8b5f9188 RBP: ffff88809aa6f610 R08: fffffbfff16bf232 R09: fffffbfff16bf231 R10: fffffbfff16bf231 R11: ffffffff8b5f918b R12: 0000000000000000 R13: ffffffff8997e780 R14: ffff88809d83c100 R15: 0000000000000002 FS: 0000000000000000(0000) GS:ffff8880ba200000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007f8d41873000 CR3: 00000000a1e25000 CR4: 00000000003406f0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: lock_acquire+0x180/0x3a0 kernel/locking/lockdep.c:3908 rcu_lock_acquire include/linux/rcupdate.h:242 [inline] rcu_read_lock include/linux/rcupdate.h:627 [inline] ieee80211_vif_get_shift net/mac80211/ieee80211_i.h:1016 [inline] ieee80211_sta_get_rates+0x110/0x7b0 net/mac80211/util.c:1677 ieee80211_update_sta_info net/mac80211/ibss.c:1014 [inline] ieee80211_rx_bss_info net/mac80211/ibss.c:1123 [inline] ieee80211_rx_mgmt_probe_beacon+0x4c4/0x14c0 net/mac80211/ibss.c:1607 ieee80211_ibss_rx_queued_mgmt+0x1d4/0x1690 net/mac80211/ibss.c:1634 ieee80211_iface_work+0x4bc/0x6e0 net/mac80211/iface.c:1341 process_one_work+0x7b9/0x15a0 kernel/workqueue.c:2153 worker_thread+0x85/0xb60 kernel/workqueue.c:2296 kthread+0x347/0x410 kernel/kthread.c:259 ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:415 ---------------- Code disassembly (best guess): 0: 08 48 85 or %cl,-0x7b(%rax) 3: db 0f fisttpl (%rdi) 5: 84 1d ff ff ff 48 test %bl,0x48ffffff(%rip) # 0x4900000a b: 8d bb 38 01 00 00 lea 0x138(%rbx),%edi 11: be 04 00 00 00 mov $0x4,%esi 16: 44 89 84 24 80 00 00 mov %r8d,0x80(%rsp) 1d: 00 1e: e8 16 84 45 00 callq 0x458439 23: f0 ff 83 38 01 00 00 lock incl 0x138(%rbx) * 2a: 49 8d 86 80 08 00 00 lea 0x880(%r14),%rax <-- trapping instruction 31: 44 8b 84 24 80 00 00 mov 0x80(%rsp),%r8d 38: 00 39: 48 89 c2 mov %rax,%rdx 3c: 48 rex.W 3d: 89 .byte 0x89 3e: 44 rex.R 3f: 24 .byte 0x24