====================================================== WARNING: possible circular locking dependency detected syzkaller #0 Tainted: G L ------------------------------------------------------ syz.4.2018/15524 is trying to acquire lock: ffff8880855b6928 (&sbi->pipe_mutex){+.+.}-{4:4}, at: autofs_write fs/autofs/waitq.c:68 [inline] ffff8880855b6928 (&sbi->pipe_mutex){+.+.}-{4:4}, at: autofs_notify_daemon+0x797/0xf60 fs/autofs/waitq.c:177 but task is already holding lock: ffff888029eac078 (&of->mutex){+.+.}-{4:4}, at: kernfs_fop_write_iter+0x1d9/0x540 fs/kernfs/file.c:336 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #3 (&of->mutex){+.+.}-{4:4}: __mutex_lock_common kernel/locking/rtmutex_api.c:561 [inline] mutex_lock_nested+0x55/0x1d0 kernel/locking/rtmutex_api.c:580 kernfs_seq_start+0x5d/0x420 fs/kernfs/file.c:165 seq_read_iter+0x37f/0xcb0 fs/seq_file.c:226 new_sync_read fs/read_write.c:473 [inline] vfs_read+0x59e/0xa90 fs/read_write.c:554 ksys_read+0x156/0x270 fs/read_write.c:696 do_syscall_x64 arch/x86/entry/syscall_64.c:61 [inline] do_syscall_64+0x171/0x540 arch/x86/entry/syscall_64.c:89 entry_SYSCALL_64_after_hwframe+0x77/0x7f -> #2 (&p->lock){+.+.}-{4:4}: __mutex_lock_common kernel/locking/rtmutex_api.c:561 [inline] mutex_lock_nested+0x55/0x1d0 kernel/locking/rtmutex_api.c:580 seq_read_iter+0xa5/0xcb0 fs/seq_file.c:183 proc_reg_read_iter+0x1bf/0x290 fs/proc/inode.c:299 copy_splice_read+0x605/0xab0 fs/splice.c:293 do_splice_read fs/splice.c:907 [inline] splice_file_to_pipe+0x4b7/0x730 fs/splice.c:1245 do_splice+0x1267/0x1a80 fs/splice.c:1329 __do_splice fs/splice.c:1386 [inline] __do_sys_splice fs/splice.c:1583 [inline] __se_sys_splice+0x353/0x490 fs/splice.c:1565 do_syscall_x64 arch/x86/entry/syscall_64.c:61 [inline] do_syscall_64+0x171/0x540 arch/x86/entry/syscall_64.c:89 entry_SYSCALL_64_after_hwframe+0x77/0x7f -> #1 (&pipe->mutex){+.+.}-{4:4}: __mutex_lock_common kernel/locking/rtmutex_api.c:561 [inline] mutex_lock_nested+0x55/0x1d0 kernel/locking/rtmutex_api.c:580 anon_pipe_prefill_and_lock fs/pipe.c:165 [inline] anon_pipe_write+0x292/0x1a90 fs/pipe.c:491 __kernel_write_iter+0x453/0x8f0 fs/read_write.c:601 __kernel_write+0x106/0x170 fs/read_write.c:621 autofs_write fs/autofs/waitq.c:70 [inline] autofs_notify_daemon+0x7aa/0xf60 fs/autofs/waitq.c:177 autofs_wait+0x11c8/0x18d0 fs/autofs/waitq.c:439 autofs_mount_wait+0x16b/0x390 fs/autofs/root.c:256 autofs_d_automount+0x64e/0x810 fs/autofs/root.c:410 follow_automount fs/namei.c:1571 [inline] __traverse_mounts+0x2fe/0x5d0 fs/namei.c:1624 traverse_mounts fs/namei.c:1653 [inline] handle_mounts fs/namei.c:1755 [inline] step_into_slowpath+0x4ba/0x820 fs/namei.c:2110 step_into fs/namei.c:2158 [inline] walk_component fs/namei.c:2294 [inline] lookup_last fs/namei.c:2795 [inline] path_lookupat+0x433/0x8c0 fs/namei.c:2819 filename_lookup+0x265/0x5d0 fs/namei.c:2848 user_path_at+0x40/0x160 fs/namei.c:3647 do_mount fs/namespace.c:4347 [inline] __do_sys_mount fs/namespace.c:4563 [inline] __se_sys_mount+0x2dc/0x420 fs/namespace.c:4540 do_syscall_x64 arch/x86/entry/syscall_64.c:61 [inline] do_syscall_64+0x171/0x540 arch/x86/entry/syscall_64.c:89 entry_SYSCALL_64_after_hwframe+0x77/0x7f -> #0 (&sbi->pipe_mutex){+.+.}-{4:4}: check_prev_add kernel/locking/lockdep.c:3209 [inline] check_prevs_add kernel/locking/lockdep.c:3328 [inline] validate_chain kernel/locking/lockdep.c:3952 [inline] __lock_acquire+0x164c/0x2de0 kernel/locking/lockdep.c:5288 lock_acquire+0x115/0x350 kernel/locking/lockdep.c:5942 __mutex_lock_common kernel/locking/rtmutex_api.c:561 [inline] mutex_lock_nested+0x55/0x1d0 kernel/locking/rtmutex_api.c:580 autofs_write fs/autofs/waitq.c:68 [inline] autofs_notify_daemon+0x797/0xf60 fs/autofs/waitq.c:177 autofs_wait+0x11c8/0x18d0 fs/autofs/waitq.c:439 autofs_mount_wait+0x16b/0x390 fs/autofs/root.c:256 autofs_d_automount+0x64e/0x810 fs/autofs/root.c:410 follow_automount fs/namei.c:1571 [inline] __traverse_mounts+0x2fe/0x5d0 fs/namei.c:1624 traverse_mounts fs/namei.c:1653 [inline] handle_mounts fs/namei.c:1755 [inline] step_into_slowpath+0x4ba/0x820 fs/namei.c:2110 step_into fs/namei.c:2158 [inline] walk_component fs/namei.c:2294 [inline] lookup_last fs/namei.c:2795 [inline] path_lookupat+0x433/0x8c0 fs/namei.c:2819 filename_lookup+0x265/0x5d0 fs/namei.c:2848 kern_path+0x3d/0x150 fs/namei.c:3042 lookup_bdev+0xc8/0x2b0 block/bdev.c:1268 resume_store+0x181/0x500 kernel/power/hibernate.c:1286 kernfs_fop_write_iter+0x3a5/0x540 fs/kernfs/file.c:345 new_sync_write fs/read_write.c:575 [inline] vfs_write+0x61e/0xbb0 fs/read_write.c:667 ksys_write+0x156/0x270 fs/read_write.c:719 do_syscall_x64 arch/x86/entry/syscall_64.c:61 [inline] do_syscall_64+0x171/0x540 arch/x86/entry/syscall_64.c:89 entry_SYSCALL_64_after_hwframe+0x77/0x7f other info that might help us debug this: Chain exists of: &sbi->pipe_mutex --> &p->lock --> &of->mutex Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(&of->mutex); lock(&p->lock); lock(&of->mutex); lock(&sbi->pipe_mutex); *** DEADLOCK *** locks held by syz.4.2018/15524: 4, on CPU#0: #0: ffff88803e47e728 (&f->f_pos_lock){+.+.}-{4:4}, at: fdget_pos+0x11e/0x160 fs/file.c:1413 #1: ffff8880353b6528 (sb_writers#7){.+.+}-{0:0}, at: file_start_write include/linux/fs.h:2765 [inline] #1: ffff8880353b6528 (sb_writers#7){.+.+}-{0:0}, at: vfs_write+0x231/0xbb0 fs/read_write.c:663 #2: ffff888029eac078 (&of->mutex){+.+.}-{4:4}, at: kernfs_fop_write_iter+0x1d9/0x540 fs/kernfs/file.c:336 #3: ffff88801e699698 (kn->active#75){.+.+}-{0:0}, at: kernfs_get_active_of fs/kernfs/file.c:73 [inline] #3: ffff88801e699698 (kn->active#75){.+.+}-{0:0}, at: kernfs_fop_write_iter+0x22c/0x540 fs/kernfs/file.c:337 stack backtrace: CPU: 0 UID: 0 PID: 15524 Comm: syz.4.2018 Tainted: G L syzkaller #0 PREEMPT_{RT,(full)} Tainted: [L]=SOFTLOCKUP Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 11/06/2026 Call Trace: dump_stack_lvl+0xe8/0x150 lib/dump_stack.c:120 print_circular_bug+0x2e2/0x300 kernel/locking/lockdep.c:2087 check_noncircular+0x12f/0x150 kernel/locking/lockdep.c:2219 check_prev_add kernel/locking/lockdep.c:3209 [inline] check_prevs_add kernel/locking/lockdep.c:3328 [inline] validate_chain kernel/locking/lockdep.c:3952 [inline] __lock_acquire+0x164c/0x2de0 kernel/locking/lockdep.c:5288 lock_acquire+0x115/0x350 kernel/locking/lockdep.c:5942 __mutex_lock_common kernel/locking/rtmutex_api.c:561 [inline] mutex_lock_nested+0x55/0x1d0 kernel/locking/rtmutex_api.c:580 autofs_write fs/autofs/waitq.c:68 [inline] autofs_notify_daemon+0x797/0xf60 fs/autofs/waitq.c:177 autofs_wait+0x11c8/0x18d0 fs/autofs/waitq.c:439 autofs_mount_wait+0x16b/0x390 fs/autofs/root.c:256 autofs_d_automount+0x64e/0x810 fs/autofs/root.c:410 follow_automount fs/namei.c:1571 [inline] __traverse_mounts+0x2fe/0x5d0 fs/namei.c:1624 traverse_mounts fs/namei.c:1653 [inline] handle_mounts fs/namei.c:1755 [inline] step_into_slowpath+0x4ba/0x820 fs/namei.c:2110 step_into fs/namei.c:2158 [inline] walk_component fs/namei.c:2294 [inline] lookup_last fs/namei.c:2795 [inline] path_lookupat+0x433/0x8c0 fs/namei.c:2819 filename_lookup+0x265/0x5d0 fs/namei.c:2848 kern_path+0x3d/0x150 fs/namei.c:3042 lookup_bdev+0xc8/0x2b0 block/bdev.c:1268 resume_store+0x181/0x500 kernel/power/hibernate.c:1286 kernfs_fop_write_iter+0x3a5/0x540 fs/kernfs/file.c:345 new_sync_write fs/read_write.c:575 [inline] vfs_write+0x61e/0xbb0 fs/read_write.c:667 ksys_write+0x156/0x270 fs/read_write.c:719 do_syscall_x64 arch/x86/entry/syscall_64.c:61 [inline] do_syscall_64+0x171/0x540 arch/x86/entry/syscall_64.c:89 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7ff351fe94d9 Code: ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 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 e8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007ff35020d028 EFLAGS: 00000246 ORIG_RAX: 0000000000000001 RAX: ffffffffffffffda RBX: 00007ff352266090 RCX: 00007ff351fe94d9 RDX: 0000000000000012 RSI: 0000200000000540 RDI: 0000000000000008 RBP: 00007ff352078136 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007ff352266128 R14: 00007ff352266090 R15: 00007ffc445401f8 autofs4:pid:15524:autofs_mount_wait: mount wait done status=-2 autofs4:pid:15524:autofs_dentry_release: releasing ffff888064166780 PM: hibernation: Configured hibernation resume from disk to 9453601 PM: hibernation: Hibernation image partition 9:16417 present PM: hibernation: Looking for hibernation image. PM: Image not found (code -6) PM: hibernation: Hibernation image not present or could not be loaded. kcov: kcov_task_exit: t = ffff88802a6e5dc0, kcov->t = ffff88802a6e5dc0 ffff888088f2c000 name hci1 bus 0 hci1: Updating devcoredump state from IDLE to IDLE. hci1: err 0x13 hci1 ffff888088f2c000 hci1: hci1: err 0x13 hci1: cancelling interleave scan All LE pending actions cleared hdev hci1 hcon ffff88802bfd8000 reason 22 hcon ffff88802bfd8000 conn ffff888085c7a000, err 103 hci1 hcon ffff88802bfd8000 chan ffff88802d926900