REISERFS (device loop3): Using r5 hash to sort names REISERFS (device loop3): Created .reiserfs_priv - reserved for xattr storage. ====================================================== WARNING: possible circular locking dependency detected 4.14.302-syzkaller #0 Not tainted ------------------------------------------------------ syz-executor.3/10737 is trying to acquire lock: (sb_writers#18){.+.+}, at: [] sb_start_write include/linux/fs.h:1551 [inline] (sb_writers#18){.+.+}, at: [] mnt_want_write_file+0xfd/0x3b0 fs/namespace.c:497 but task is already holding lock: (&sbi->lock){+.+.}, at: [] reiserfs_write_lock+0x75/0xf0 fs/reiserfs/lock.c:27 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #1 (&sbi->lock){+.+.}: __mutex_lock_common kernel/locking/mutex.c:756 [inline] __mutex_lock+0xc4/0x1310 kernel/locking/mutex.c:893 reiserfs_write_lock+0x75/0xf0 fs/reiserfs/lock.c:27 reiserfs_dirty_inode+0xa8/0x200 fs/reiserfs/super.c:710 __mark_inode_dirty+0x11e/0xf40 fs/fs-writeback.c:2134 generic_update_time+0x1b0/0x270 fs/inode.c:1657 update_time fs/inode.c:1673 [inline] touch_atime+0x1ed/0x250 fs/inode.c:1745 file_accessed include/linux/fs.h:2077 [inline] iterate_dir+0x4c5/0x5e0 fs/readdir.c:57 SYSC_getdents64 fs/readdir.c:358 [inline] SyS_getdents64+0x125/0x230 fs/readdir.c:339 do_syscall_64+0x1d5/0x640 arch/x86/entry/common.c:292 entry_SYSCALL_64_after_hwframe+0x5e/0xd3 -> #0 (sb_writers#18){.+.+}: lock_acquire+0x170/0x3f0 kernel/locking/lockdep.c:3998 percpu_down_read_preempt_disable include/linux/percpu-rwsem.h:36 [inline] percpu_down_read include/linux/percpu-rwsem.h:59 [inline] __sb_start_write+0x64/0x260 fs/super.c:1342 sb_start_write include/linux/fs.h:1551 [inline] mnt_want_write_file+0xfd/0x3b0 fs/namespace.c:497 reiserfs_ioctl+0x18e/0x8b0 fs/reiserfs/ioctl.c:110 vfs_ioctl fs/ioctl.c:46 [inline] file_ioctl fs/ioctl.c:500 [inline] do_vfs_ioctl+0x75a/0xff0 fs/ioctl.c:684 SYSC_ioctl fs/ioctl.c:701 [inline] SyS_ioctl+0x7f/0xb0 fs/ioctl.c:692 do_syscall_64+0x1d5/0x640 arch/x86/entry/common.c:292 entry_SYSCALL_64_after_hwframe+0x5e/0xd3 other info that might help us debug this: Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(&sbi->lock); lock(sb_writers#18); lock(&sbi->lock); lock(sb_writers#18); *** DEADLOCK *** 1 lock held by syz-executor.3/10737: #0: (&sbi->lock){+.+.}, at: [] reiserfs_write_lock+0x75/0xf0 fs/reiserfs/lock.c:27 stack backtrace: CPU: 0 PID: 10737 Comm: syz-executor.3 Not tainted 4.14.302-syzkaller #0 NILFS (loop5): segctord starting. Construction interval = 5 seconds, CP frequency < 30 seconds Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/26/2022 Call Trace: __dump_stack lib/dump_stack.c:17 [inline] dump_stack+0x1b2/0x281 lib/dump_stack.c:58 print_circular_bug.constprop.0.cold+0x2d7/0x41e kernel/locking/lockdep.c:1258 check_prev_add kernel/locking/lockdep.c:1905 [inline] check_prevs_add kernel/locking/lockdep.c:2022 [inline] validate_chain kernel/locking/lockdep.c:2464 [inline] __lock_acquire+0x2e0e/0x3f20 kernel/locking/lockdep.c:3491 lock_acquire+0x170/0x3f0 kernel/locking/lockdep.c:3998 percpu_down_read_preempt_disable include/linux/percpu-rwsem.h:36 [inline] percpu_down_read include/linux/percpu-rwsem.h:59 [inline] __sb_start_write+0x64/0x260 fs/super.c:1342 sb_start_write include/linux/fs.h:1551 [inline] mnt_want_write_file+0xfd/0x3b0 fs/namespace.c:497 reiserfs_ioctl+0x18e/0x8b0 fs/reiserfs/ioctl.c:110 vfs_ioctl fs/ioctl.c:46 [inline] file_ioctl fs/ioctl.c:500 [inline] do_vfs_ioctl+0x75a/0xff0 fs/ioctl.c:684 SYSC_ioctl fs/ioctl.c:701 [inline] SyS_ioctl+0x7f/0xb0 fs/ioctl.c:692 do_syscall_64+0x1d5/0x640 arch/x86/entry/common.c:292 entry_SYSCALL_64_after_hwframe+0x5e/0xd3 RIP: 0033:0x7fccce8770d9 RSP: 002b:00007fccccde9168 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 RAX: ffffffffffffffda RBX: 00007fccce996f80 RCX: 00007fccce8770d9 RDX: 00000000200000c0 RSI: 0000000040087602 RDI: 0000000000000005 RBP: 00007fccce8d2ae9 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007ffc5ccbab5f R14: 00007fccccde9300 R15: 0000000000022000 EXT4-fs (loop4): mounted filesystem without journal. Opts: ,errors=continue Quota error (device loop4): find_block_dqentry: Quota for id 0 referenced but not present Quota error (device loop4): qtree_read_dquot: Can't read quota structure for id 0 REISERFS (device loop3): found reiserfs format "3.6" with non-standard journal REISERFS (device loop3): using ordered data mode reiserfs: using flush barriers NILFS (loop5): segctord starting. Construction interval = 5 seconds, CP frequency < 30 seconds REISERFS (device loop3): journal params: device loop3, size 512, journal first block 18, max trans len 256, max batch 225, max commit age 30, max trans age 30 REISERFS (device loop3): checking transaction log (loop3) EXT4-fs (loop4): mounted filesystem without journal. Opts: ,errors=continue REISERFS (device loop3): Using r5 hash to sort names REISERFS (device loop3): Created .reiserfs_priv - reserved for xattr storage. befs: (loop5): No write support. Marking filesystem read-only befs: (loop5): invalid magic header REISERFS (device loop3): found reiserfs format "3.6" with non-standard journal REISERFS (device loop3): using ordered data mode reiserfs: using flush barriers REISERFS (device loop3): journal params: device loop3, size 512, journal first block 18, max trans len 256, max batch 225, max commit age 30, max trans age 30 REISERFS (device loop3): checking transaction log (loop3) REISERFS (device loop3): Using r5 hash to sort names REISERFS (device loop3): Created .reiserfs_priv - reserved for xattr storage. print_req_error: I/O error, dev loop0, sector 0 input: syz1 as /devices/virtual/input/input5 REISERFS (device loop3): found reiserfs format "3.6" with non-standard journal REISERFS (device loop3): using ordered data mode reiserfs: using flush barriers REISERFS (device loop3): journal params: device loop3, size 512, journal first block 18, max trans len 256, max batch 225, max commit age 30, max trans age 30 REISERFS (device loop3): checking transaction log (loop3) REISERFS (device loop3): Using r5 hash to sort names REISERFS (device loop3): Created .reiserfs_priv - reserved for xattr storage. netlink: 24 bytes leftover after parsing attributes in process `syz-executor.3'. print_req_error: I/O error, dev loop0, sector 0 netlink: 24 bytes leftover after parsing attributes in process `syz-executor.3'. caif:caif_disconnect_client(): nothing to disconnect caif:caif_disconnect_client(): nothing to disconnect input: syz1 as /devices/virtual/input/input6 input: syz1 as /devices/virtual/input/input7 caif:caif_disconnect_client(): nothing to disconnect caif:caif_disconnect_client(): nothing to disconnect caif:caif_disconnect_client(): nothing to disconnect caif:caif_disconnect_client(): nothing to disconnect caif:caif_disconnect_client(): nothing to disconnect input: syz1 as /devices/virtual/input/input8 netlink: 24 bytes leftover after parsing attributes in process `syz-executor.3'. input: syz1 as /devices/virtual/input/input9 input: syz1 as /devices/virtual/input/input10 netlink: 24 bytes leftover after parsing attributes in process `syz-executor.3'. input: syz1 as /devices/virtual/input/input11 input: syz1 as /devices/virtual/input/input12 ubi0: attaching mtd0 input: syz1 as /devices/virtual/input/input13 ubi0: scanning is finished ubi0: empty MTD device detected ubi0: attached mtd0 (name "mtdram test device", size 0 MiB) ubi0: PEB size: 4096 bytes (4 KiB), LEB size: 3968 bytes ubi0: min./max. I/O unit sizes: 1/64, sub-page size 1 ubi0: VID header offset: 64 (aligned 64), data offset: 128 ubi0: good PEBs: 32, bad PEBs: 0, corrupted PEBs: 0 ubi0: user volume: 0, internal volumes: 1, max. volumes count: 23 ubi0: max/mean erase counter: 0/0, WL threshold: 4096, image sequence number: 2534221743 ubi0: available PEBs: 28, total reserved PEBs: 4, PEBs reserved for bad PEB handling: 0 ubi0: background thread "ubi_bgt0d" started, PID 11212 ubi0: detaching mtd0 ubi0: mtd0 is detached ubi0: attaching mtd0 ubi0: scanning is finished input: syz1 as /devices/virtual/input/input14 ubi0: attached mtd0 (name "mtdram test device", size 0 MiB) ubi0: PEB size: 4096 bytes (4 KiB), LEB size: 3968 bytes IPVS: ftp: loaded support on port[0] = 21 ubi0: min./max. I/O unit sizes: 1/64, sub-page size 1 TCP: request_sock_TCPv6: Possible SYN flooding on port 20002. Sending cookies. Check SNMP counters. ubi0: VID header offset: 64 (aligned 64), data offset: 128 ubi0: good PEBs: 32, bad PEBs: 0, corrupted PEBs: 0 ubi0: user volume: 0, internal volumes: 1, max. volumes count: 23 EXT4-fs (loop3): mounted filesystem without journal. Opts: ,errors=continue ubi0: max/mean erase counter: 1/1, WL threshold: 4096, image sequence number: 2534221743 ubi0: available PEBs: 28, total reserved PEBs: 4, PEBs reserved for bad PEB handling: 0 ubi0: background thread "ubi_bgt0d" started, PID 11265 TCP: request_sock_TCPv6: Possible SYN flooding on port 20002. Sending cookies. Check SNMP counters. ubi: mtd0 is already attached to ubi0 ubi0: detaching mtd0 ubi0: mtd0 is detached EXT4-fs (loop3): mounted filesystem without journal. Opts: ,errors=continue ubi0: attaching mtd0 TCP: request_sock_TCPv6: Possible SYN flooding on port 20002. Sending cookies. Check SNMP counters. ubi0: scanning is finished device lo entered promiscuous mode EXT4-fs (loop3): mounted filesystem without journal. Opts: ,errors=continue ubi0: attached mtd0 (name "mtdram test device", size 0 MiB) ubi0: PEB size: 4096 bytes (4 KiB), LEB size: 3968 bytes ubi0: min./max. I/O unit sizes: 1/64, sub-page size 1 ubi0: VID header offset: 64 (aligned 64), data offset: 128 device lo left promiscuous mode ubi0: good PEBs: 32, bad PEBs: 0, corrupted PEBs: 0 ubi0: user volume: 0, internal volumes: 1, max. volumes count: 23 ubi0: max/mean erase counter: 2/1, WL threshold: 4096, image sequence number: 2534221743 ubi0: available PEBs: 28, total reserved PEBs: 4, PEBs reserved for bad PEB handling: 0 ubi0: background thread "ubi_bgt0d" started, PID 11352 ubi: mtd0 is already attached to ubi0 ubi0: detaching mtd0 EXT4-fs (loop3): mounted filesystem without journal. Opts: ,errors=continue ubi0: mtd0 is detached device lo entered promiscuous mode ubi0: attaching mtd0 ubi0: scanning is finished device lo left promiscuous mode ubi0: attached mtd0 (name "mtdram test device", size 0 MiB) device lo entered promiscuous mode ubi0: PEB size: 4096 bytes (4 KiB), LEB size: 3968 bytes ubi0: min./max. I/O unit sizes: 1/64, sub-page size 1 ubi0: VID header offset: 64 (aligned 64), data offset: 128 ubi0: good PEBs: 32, bad PEBs: 0, corrupted PEBs: 0 ubi0: user volume: 0, internal volumes: 1, max. volumes count: 23 ubi0: max/mean erase counter: 2/1, WL threshold: 4096, image sequence number: 2534221743 ubi0: available PEBs: 28, total reserved PEBs: 4, PEBs reserved for bad PEB handling: 0 ubi: mtd0 is already attached to ubi0 ubi0: background thread "ubi_bgt0d" started, PID 11386 ubi0: detaching mtd0 ubi0: mtd0 is detached device lo left promiscuous mode device lo entered promiscuous mode kvm: vcpu 0: requested 128 ns lapic timer period limited to 500000 ns usb usb9: usbfs: interface 0 claimed by hub while 'syz-executor.2' sets config #0 netlink: 64 bytes leftover after parsing attributes in process `syz-executor.5'. kvm: vcpu 0: requested 128 ns lapic timer period limited to 500000 ns usb usb9: usbfs: interface 0 claimed by usbfs while 'syz-executor.2' sets config #1 kauditd_printk_skb: 2 callbacks suppressed audit: type=1800 audit(1671571684.164:26): pid=11445 uid=0 auid=4294967295 ses=4294967295 op="collect_data" cause="failed(directio)" comm="syz-executor.5" name="bus" dev="loop5" ino=9 res=0 audit: type=1804 audit(1671571684.184:27): pid=11445 uid=0 auid=4294967295 ses=4294967295 op="invalid_pcr" cause="open_writers" comm="syz-executor.5" name="/root/syzkaller-testdir320455962/syzkaller.YTBQKb/51/file0/bus" dev="loop5" ino=9 res=1 audit: type=1804 audit(1671571684.184:28): pid=11445 uid=0 auid=4294967295 ses=4294967295 op="invalid_pcr" cause="ToMToU" comm="syz-executor.5" name="/root/syzkaller-testdir320455962/syzkaller.YTBQKb/51/file0/bus" dev="loop5" ino=9 res=1 audit: type=1804 audit(1671571684.184:29): pid=11445 uid=0 auid=4294967295 ses=4294967295 op="invalid_pcr" cause="open_writers" comm="syz-executor.5" name="/root/syzkaller-testdir320455962/syzkaller.YTBQKb/51/file0/bus" dev="loop5" ino=9 res=1 netlink: 64 bytes leftover after parsing attributes in process `syz-executor.5'. hub 9-0:1.0: USB hub found kvm: vcpu 0: requested 128 ns lapic timer period limited to 500000 ns hub 9-0:1.0: 8 ports detected audit: type=1800 audit(1671571684.644:30): pid=11486 uid=0 auid=4294967295 ses=4294967295 op="collect_data" cause="failed(directio)" comm="syz-executor.5" name="bus" dev="loop5" ino=10 res=0 netlink: 64 bytes leftover after parsing attributes in process `syz-executor.5'. audit: type=1804 audit(1671571684.664:31): pid=11486 uid=0 auid=4294967295 ses=4294967295 op="invalid_pcr" cause="open_writers" comm="syz-executor.5" name="/root/syzkaller-testdir320455962/syzkaller.YTBQKb/52/file0/bus" dev="loop5" ino=10 res=1 audit: type=1804 audit(1671571684.664:32): pid=11486 uid=0 auid=4294967295 ses=4294967295 op="invalid_pcr" cause="ToMToU" comm="syz-executor.5" name="/root/syzkaller-testdir320455962/syzkaller.YTBQKb/52/file0/bus" dev="loop5" ino=10 res=1 audit: type=1804 audit(1671571684.664:33): pid=11486 uid=0 auid=4294967295 ses=4294967295 op="invalid_pcr" cause="open_writers" comm="syz-executor.5" name="/root/syzkaller-testdir320455962/syzkaller.YTBQKb/52/file0/bus" dev="loop5" ino=10 res=1 usb usb9: usbfs: interface 0 claimed by hub while 'syz-executor.2' sets config #0 usb usb9: usbfs: interface 0 claimed by usbfs while 'syz-executor.2' sets config #1 kvm: vcpu 0: requested 128 ns lapic timer period limited to 500000 ns hub 9-0:1.0: USB hub found hub 9-0:1.0: 8 ports detected