====================================================== WARNING: possible circular locking dependency detected 6.14.0-rc1-syzkaller-00020-g0de63bb7d919 #0 Not tainted ------------------------------------------------------ syz.2.4970/23809 is trying to acquire lock: ffff88802addb940 (&sbi->pipe_mutex){+.+.}-{4:4}, at: autofs_write fs/autofs/waitq.c:55 [inline] ffff88802addb940 (&sbi->pipe_mutex){+.+.}-{4:4}, at: autofs_notify_daemon+0x452/0xbf0 fs/autofs/waitq.c:164 but task is already holding lock: ffff888013087488 (&of->mutex){+.+.}-{4:4}, at: kernfs_fop_write_iter+0x27b/0x500 fs/kernfs/file.c:325 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #2 (&of->mutex){+.+.}-{4:4}: __mutex_lock_common kernel/locking/mutex.c:585 [inline] __mutex_lock+0x19b/0xb10 kernel/locking/mutex.c:730 kernfs_fop_write_iter+0x27b/0x500 fs/kernfs/file.c:325 iter_file_splice_write+0x90f/0x10b0 fs/splice.c:743 do_splice_from fs/splice.c:941 [inline] do_splice+0x146a/0x1f70 fs/splice.c:1354 __do_splice+0x327/0x360 fs/splice.c:1436 __do_sys_splice fs/splice.c:1639 [inline] __se_sys_splice fs/splice.c:1621 [inline] __ia32_sys_splice+0x189/0x250 fs/splice.c:1621 do_syscall_32_irqs_on arch/x86/entry/common.c:165 [inline] __do_fast_syscall_32+0x73/0x120 arch/x86/entry/common.c:386 do_fast_syscall_32+0x32/0x80 arch/x86/entry/common.c:411 entry_SYSENTER_compat_after_hwframe+0x84/0x8e -> #1 (&pipe->mutex){+.+.}-{4:4}: __mutex_lock_common kernel/locking/mutex.c:585 [inline] __mutex_lock+0x19b/0xb10 kernel/locking/mutex.c:730 pipe_write+0x166/0x1b30 fs/pipe.c:456 __kernel_write_iter+0x71f/0xa90 fs/read_write.c:612 __kernel_write+0xf6/0x140 fs/read_write.c:632 autofs_write fs/autofs/waitq.c:57 [inline] autofs_notify_daemon+0x484/0xbf0 fs/autofs/waitq.c:164 autofs_wait+0x12ca/0x1c40 fs/autofs/waitq.c:426 autofs_mount_wait+0x132/0x380 fs/autofs/root.c:255 autofs_d_automount+0x390/0x7f0 fs/autofs/root.c:401 follow_automount fs/namei.c:1454 [inline] __traverse_mounts+0x192/0x760 fs/namei.c:1499 traverse_mounts fs/namei.c:1528 [inline] handle_mounts fs/namei.c:1631 [inline] step_into+0x593/0x2220 fs/namei.c:1952 open_last_lookups fs/namei.c:3777 [inline] path_openat+0x74c/0x2d80 fs/namei.c:3986 do_filp_open+0x20c/0x470 fs/namei.c:4016 do_sys_openat2+0x17a/0x1e0 fs/open.c:1427 do_sys_open fs/open.c:1442 [inline] __do_compat_sys_openat fs/open.c:1504 [inline] __se_compat_sys_openat fs/open.c:1502 [inline] __ia32_compat_sys_openat+0x16e/0x210 fs/open.c:1502 do_syscall_32_irqs_on arch/x86/entry/common.c:165 [inline] __do_fast_syscall_32+0x73/0x120 arch/x86/entry/common.c:386 do_fast_syscall_32+0x32/0x80 arch/x86/entry/common.c:411 entry_SYSENTER_compat_after_hwframe+0x84/0x8e -> #0 (&sbi->pipe_mutex){+.+.}-{4:4}: check_prev_add kernel/locking/lockdep.c:3163 [inline] check_prevs_add kernel/locking/lockdep.c:3282 [inline] validate_chain kernel/locking/lockdep.c:3906 [inline] __lock_acquire+0x249e/0x3c40 kernel/locking/lockdep.c:5228 lock_acquire.part.0+0x11b/0x380 kernel/locking/lockdep.c:5851 __mutex_lock_common kernel/locking/mutex.c:585 [inline] __mutex_lock+0x19b/0xb10 kernel/locking/mutex.c:730 autofs_write fs/autofs/waitq.c:55 [inline] autofs_notify_daemon+0x452/0xbf0 fs/autofs/waitq.c:164 autofs_wait+0x12ca/0x1c40 fs/autofs/waitq.c:426 autofs_mount_wait+0x132/0x380 fs/autofs/root.c:255 autofs_d_automount+0x390/0x7f0 fs/autofs/root.c:401 follow_automount fs/namei.c:1454 [inline] __traverse_mounts+0x192/0x760 fs/namei.c:1499 traverse_mounts fs/namei.c:1528 [inline] handle_mounts fs/namei.c:1631 [inline] step_into+0x593/0x2220 fs/namei.c:1952 walk_component+0xfc/0x5b0 fs/namei.c:2120 lookup_last fs/namei.c:2612 [inline] path_lookupat+0x17f/0x770 fs/namei.c:2636 filename_lookup+0x221/0x5f0 fs/namei.c:2665 kern_path+0x35/0x50 fs/namei.c:2773 lookup_bdev+0xd9/0x280 block/bdev.c:1163 resume_store+0x1d8/0x460 kernel/power/hibernate.c:1247 kobj_attr_store+0x55/0x80 lib/kobject.c:840 sysfs_kf_write+0x117/0x170 fs/sysfs/file.c:139 kernfs_fop_write_iter+0x33d/0x500 fs/kernfs/file.c:334 new_sync_write fs/read_write.c:586 [inline] vfs_write+0x5ae/0x1150 fs/read_write.c:679 ksys_write+0x12b/0x250 fs/read_write.c:731 do_syscall_32_irqs_on arch/x86/entry/common.c:165 [inline] __do_fast_syscall_32+0x73/0x120 arch/x86/entry/common.c:386 do_fast_syscall_32+0x32/0x80 arch/x86/entry/common.c:411 entry_SYSENTER_compat_after_hwframe+0x84/0x8e other info that might help us debug this: Chain exists of: &sbi->pipe_mutex --> &pipe->mutex --> &of->mutex Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(&of->mutex); lock(&pipe->mutex); lock(&of->mutex); lock(&sbi->pipe_mutex); *** DEADLOCK *** 4 locks held by syz.2.4970/23809: #0: ffff88802226e638 (&f->f_pos_lock){+.+.}-{4:4}, at: fdget_pos+0x267/0x390 fs/file.c:1192 #1: ffff888045af2420 (sb_writers#8){.+.+}-{0:0}, at: ksys_write+0x12b/0x250 fs/read_write.c:731 #2: ffff888013087488 (&of->mutex){+.+.}-{4:4}, at: kernfs_fop_write_iter+0x27b/0x500 fs/kernfs/file.c:325 #3: ffff88801c72bc38 (kn->active#66){.+.+}-{0:0}, at: kernfs_fop_write_iter+0x29e/0x500 fs/kernfs/file.c:326 stack backtrace: CPU: 0 UID: 0 PID: 23809 Comm: syz.2.4970 Not tainted 6.14.0-rc1-syzkaller-00020-g0de63bb7d919 #0 Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2~bpo12+1 04/01/2014 Call Trace: __dump_stack lib/dump_stack.c:94 [inline] dump_stack_lvl+0x116/0x1f0 lib/dump_stack.c:120 print_circular_bug+0x490/0x760 kernel/locking/lockdep.c:2076 check_noncircular+0x31a/0x400 kernel/locking/lockdep.c:2208 check_prev_add kernel/locking/lockdep.c:3163 [inline] check_prevs_add kernel/locking/lockdep.c:3282 [inline] validate_chain kernel/locking/lockdep.c:3906 [inline] __lock_acquire+0x249e/0x3c40 kernel/locking/lockdep.c:5228 lock_acquire.part.0+0x11b/0x380 kernel/locking/lockdep.c:5851 __mutex_lock_common kernel/locking/mutex.c:585 [inline] __mutex_lock+0x19b/0xb10 kernel/locking/mutex.c:730 autofs_write fs/autofs/waitq.c:55 [inline] autofs_notify_daemon+0x452/0xbf0 fs/autofs/waitq.c:164 autofs_wait+0x12ca/0x1c40 fs/autofs/waitq.c:426 autofs_mount_wait+0x132/0x380 fs/autofs/root.c:255 autofs_d_automount+0x390/0x7f0 fs/autofs/root.c:401 follow_automount fs/namei.c:1454 [inline] __traverse_mounts+0x192/0x760 fs/namei.c:1499 traverse_mounts fs/namei.c:1528 [inline] handle_mounts fs/namei.c:1631 [inline] step_into+0x593/0x2220 fs/namei.c:1952 walk_component+0xfc/0x5b0 fs/namei.c:2120 lookup_last fs/namei.c:2612 [inline] path_lookupat+0x17f/0x770 fs/namei.c:2636 filename_lookup+0x221/0x5f0 fs/namei.c:2665 kern_path+0x35/0x50 fs/namei.c:2773 lookup_bdev+0xd9/0x280 block/bdev.c:1163 resume_store+0x1d8/0x460 kernel/power/hibernate.c:1247 kobj_attr_store+0x55/0x80 lib/kobject.c:840 sysfs_kf_write+0x117/0x170 fs/sysfs/file.c:139 kernfs_fop_write_iter+0x33d/0x500 fs/kernfs/file.c:334 new_sync_write fs/read_write.c:586 [inline] vfs_write+0x5ae/0x1150 fs/read_write.c:679 ksys_write+0x12b/0x250 fs/read_write.c:731 do_syscall_32_irqs_on arch/x86/entry/common.c:165 [inline] __do_fast_syscall_32+0x73/0x120 arch/x86/entry/common.c:386 do_fast_syscall_32+0x32/0x80 arch/x86/entry/common.c:411 entry_SYSENTER_compat_after_hwframe+0x84/0x8e RIP: 0023:0xf7f86579 Code: b8 01 10 06 03 74 b4 01 10 07 03 74 b0 01 10 08 03 74 d8 01 00 00 00 00 00 00 00 00 00 00 00 00 00 51 52 55 89 e5 0f 34 cd 80 <5d> 5a 59 c3 90 90 90 90 8d b4 26 00 00 00 00 8d b4 26 00 00 00 00 RSP: 002b:00000000f506455c EFLAGS: 00000296 ORIG_RAX: 0000000000000004 RAX: ffffffffffffffda RBX: 0000000000000006 RCX: 0000000020000040 RDX: 0000000000000012 RSI: 0000000000000000 RDI: 0000000000000000 RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000296 R12: 0000000000000000 R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000 PM: Image not found (code -22) ---------------- Code disassembly (best guess), 2 bytes skipped: 0: 10 06 adc %al,(%rsi) 2: 03 74 b4 01 add 0x1(%rsp,%rsi,4),%esi 6: 10 07 adc %al,(%rdi) 8: 03 74 b0 01 add 0x1(%rax,%rsi,4),%esi c: 10 08 adc %cl,(%rax) e: 03 74 d8 01 add 0x1(%rax,%rbx,8),%esi 1e: 00 51 52 add %dl,0x52(%rcx) 21: 55 push %rbp 22: 89 e5 mov %esp,%ebp 24: 0f 34 sysenter 26: cd 80 int $0x80 * 28: 5d pop %rbp <-- trapping instruction 29: 5a pop %rdx 2a: 59 pop %rcx 2b: c3 ret 2c: 90 nop 2d: 90 nop 2e: 90 nop 2f: 90 nop 30: 8d b4 26 00 00 00 00 lea 0x0(%rsi,%riz,1),%esi 37: 8d b4 26 00 00 00 00 lea 0x0(%rsi,%riz,1),%esi