============================================ WARNING: possible recursive locking detected syzkaller #0 Tainted: G L Y -------------------------------------------- syz.4.502/7750 is trying to acquire lock: ffff888028d4e3e8 (&sb->s_type->i_mutex_key#10){++++}-{4:4}, at: inode_lock_shared include/linux/fs.h:1039 [inline] ffff888028d4e3e8 (&sb->s_type->i_mutex_key#10){++++}-{4:4}, at: blkdev_buffered_write block/fops.c:734 [inline] ffff888028d4e3e8 (&sb->s_type->i_mutex_key#10){++++}-{4:4}, at: blkdev_write_iter+0xd12/0x11d0 block/fops.c:812 but task is already holding lock: ffff888028d4e3e8 (&sb->s_type->i_mutex_key#10){++++}-{4:4}, at: inode_lock_shared include/linux/fs.h:1039 [inline] ffff888028d4e3e8 (&sb->s_type->i_mutex_key#10){++++}-{4:4}, at: blkdev_write_iter+0xc5e/0x11d0 block/fops.c:811 other info that might help us debug this: Possible unsafe locking scenario: CPU0 ---- lock(&sb->s_type->i_mutex_key#10); lock(&sb->s_type->i_mutex_key#10); *** DEADLOCK *** May be due to missing lock nesting notation locks held by syz.4.502/7750: 1, last CPU#1: #0: ffff888028d4e3e8 (&sb->s_type->i_mutex_key#10){++++}-{4:4}, at: inode_lock_shared include/linux/fs.h:1039 [inline] #0: ffff888028d4e3e8 (&sb->s_type->i_mutex_key#10){++++}-{4:4}, at: blkdev_write_iter+0xc5e/0x11d0 block/fops.c:811 stack backtrace: CPU: 1 UID: 0 PID: 7750 Comm: syz.4.502 Tainted: G L Y syzkaller #0 PREEMPT(full) Tainted: [L]=SOFTLOCKUP, [Y]=FORCED_BIND Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 Call Trace: __dump_stack lib/dump_stack.c:94 [inline] dump_stack_lvl+0x100/0x190 lib/dump_stack.c:120 print_deadlock_bug.cold+0xbd/0xca kernel/locking/lockdep.c:3085 check_deadlock kernel/locking/lockdep.c:3137 [inline] validate_chain kernel/locking/lockdep.c:3939 [inline] __lock_acquire+0x13f4/0x1f40 kernel/locking/lockdep.c:5288 lock_acquire kernel/locking/lockdep.c:5942 [inline] lock_acquire+0x1d1/0x380 kernel/locking/lockdep.c:5899 down_read+0x94/0x4c0 kernel/locking/rwsem.c:1574 inode_lock_shared include/linux/fs.h:1039 [inline] blkdev_buffered_write block/fops.c:734 [inline] blkdev_write_iter+0xd12/0x11d0 block/fops.c:812 new_sync_write fs/read_write.c:595 [inline] vfs_write+0x6af/0x1050 fs/read_write.c:687 ksys_write+0x12a/0x250 fs/read_write.c:739 do_syscall_32_irqs_on arch/x86/entry/syscall_32.c:79 [inline] __do_fast_syscall_32+0x14b/0x8c0 arch/x86/entry/syscall_32.c:282 do_fast_syscall_32+0x32/0x70 arch/x86/entry/syscall_32.c:307 entry_SYSENTER_compat_after_hwframe+0x84/0x8e RIP: 0023:0xf7f83fbc Code: d2 74 05 c1 e8 0c 89 02 8b 5d fc 31 c0 c9 c3 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 0f 1f 00 51 52 55 89 e5 0f 34 cd 80 <5d> 5a 59 c3 90 2e 8d b4 26 00 00 00 00 8d b4 26 00 00 00 00 58 b8 RSP: 002b:00000000f543650c EFLAGS: 00000292 ORIG_RAX: 0000000000000004 RAX: ffffffffffffffda RBX: 0000000000000004 RCX: 0000000000000000 RDX: 00000000ffffffdb RSI: 0000000000000000 RDI: 0000000000000000 RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000292 R12: 0000000000000000 R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000 kernfs runtime_suspended_time: removing net syz_tun: siw: event 10 In tnode_resize ffff88804eda9520 inflate_threshold=50 threshold=25 In tnode_resize ffff88802612a020 inflate_threshold=50 threshold=25 In tnode_resize ffff88804d1c61a0 inflate_threshold=50 threshold=25 In tnode_resize ffff8880267ba820 inflate_threshold=50 threshold=25 In tnode_resize ffff888000273e20 inflate_threshold=50 threshold=25 trie_flush found=1 In tnode_resize ffff88804eda9520 inflate_threshold=50 threshold=25 In tnode_resize ffff88802612a020 inflate_threshold=50 threshold=25 Deleting ac141400/24 dsfield=0x00 t=ffff888025757738 bridge0: port 3(syz_tun) event 16 bridge0: br_fill_ifinfo event 16 port syz_tun master bridge0 kernfs tx_window_errors: removing kernfs rx_compressed: removing kernfs tx_compressed: removing kernfs rx_nohandler: removing kernfs statistics: removing kernfs netdev_group: removing kernfs type: removing kernfs dev_id: removing kernfs dev_port: removing kernfs iflink: removing kernfs ifindex: removing kernfs name_assign_type: removing kernfs addr_assign_type: removing kernfs addr_len: removing kernfs link_mode: removing kernfs address: removing kernfs broadcast: removing kernfs speed: removing kernfs duplex: removing kernfs dormant: removing kernfs testing: removing kernfs operstate: removing kernfs carrier_changes: removing kernfs ifalias: removing kernfs carrier: removing kernfs mtu: removing kernfs flags: removing kernfs tx_queue_len: removing kernfs gro_flush_timeout: removing kernfs napi_defer_hard_irqs: removing kernfs proto_down: removing kernfs carrier_up_count: removing kernfs carrier_down_count: removing kernfs threaded: removing PM: Removing info for No Bus:syz_tun kobject: 'syz_tun' (ffff88806ff087e0): kobject_uevent_env kobject: 'syz_tun' (ffff88806ff087e0): fill_kobj_path: path = '/devices/virtual/net/syz_tun' kernfs syz_tun: removing kobject: 'raw-gadget.2' (ffff888061f56e00): auto cleanup kobject_del ---------------- Code disassembly (best guess): 0: d2 74 05 c1 shlb %cl,-0x3f(%rbp,%rax,1) 4: e8 0c 89 02 8b call 0x8b028915 9: 5d pop %rbp a: fc cld b: 31 c0 xor %eax,%eax d: c9 leave e: c3 ret f: 90 nop 10: 90 nop 11: 90 nop 12: 90 nop 13: 90 nop 14: 90 nop 15: 90 nop 16: 90 nop 17: 90 nop 18: 90 nop 19: 90 nop 1a: 90 nop 1b: 90 nop 1c: 90 nop 1d: 90 nop 1e: 0f 1f 00 nopl (%rax) 21: 51 push %rcx 22: 52 push %rdx 23: 55 push %rbp 24: 89 e5 mov %esp,%ebp 26: 0f 34 sysenter 28: cd 80 int $0x80 * 2a: 5d pop %rbp <-- trapping instruction 2b: 5a pop %rdx 2c: 59 pop %rcx 2d: c3 ret 2e: 90 nop 2f: 2e 8d b4 26 00 00 00 cs lea 0x0(%rsi,%riz,1),%esi 36: 00 37: 8d b4 26 00 00 00 00 lea 0x0(%rsi,%riz,1),%esi 3e: 58 pop %rax 3f: b8 .byte 0xb8