Hello,
syzbot found the following issue on:
HEAD commit: 3f8a27f9e27b Linux 4.19.211
git tree: linux-4.19.y
console output:
https://syzkaller.appspot.com/x/log.txt?x=16301ff8480000
kernel config:
https://syzkaller.appspot.com/x/.config?x=9b9277b418617afe
dashboard link:
https://syzkaller.appspot.com/bug?extid=becf4e31e71a2e4f7a56
compiler: gcc version 10.2.1 20210110 (Debian 10.2.1-6)
Unfortunately, I don't have any reproducer for this issue yet.
Downloadable assets:
disk image:
https://storage.googleapis.com/syzbot-assets/98c0bdb4abb3/disk-3f8a27f9.raw.xz
vmlinux:
https://storage.googleapis.com/syzbot-assets/ea228ff02669/vmlinux-3f8a27f9.xz
IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by:
syzbot+becf4e...@syzkaller.appspotmail.com
REISERFS warning (device nbd0): sh-2006 read_super_block: bread failed (dev nbd0, block 8, size 1024)
print_req_error: I/O error, dev nbd0, sector 128
REISERFS warning (device nbd0): sh-2006 read_super_block: bread failed (dev nbd0, block 64, size 1024)
======================================================
WARNING: possible circular locking dependency detected
4.19.211-syzkaller #0 Not tainted
------------------------------------------------------
syz-executor.0/3470 is trying to acquire lock:
000000007c9b8ab2 (&type->s_umount_key#49){++++}, at: __get_super.part.0+0x209/0x2e0 fs/super.c:698
but task is already holding lock:
00000000b149477b (&bdev->bd_mutex){+.+.}, at: __blkdev_get+0x1d0/0x1480 fs/block_dev.c:1478
which lock already depends on the new lock.
the existing dependency chain (in reverse order) is:
-> #1 (&bdev->bd_mutex){+.+.}:
blkdev_put+0x30/0x520 fs/block_dev.c:1839
release_journal_dev fs/reiserfs/journal.c:2601 [inline]
free_journal_ram+0x44b/0x600 fs/reiserfs/journal.c:1904
do_journal_release fs/reiserfs/journal.c:1970 [inline]
journal_release+0x225/0x4d0 fs/reiserfs/journal.c:1981
reiserfs_put_super+0xe0/0x5c0 fs/reiserfs/super.c:616
generic_shutdown_super+0x144/0x370 fs/super.c:456
kill_block_super+0x97/0xf0 fs/super.c:1185
deactivate_locked_super+0x94/0x160 fs/super.c:329
deactivate_super+0x174/0x1a0 fs/super.c:360
cleanup_mnt+0x1a8/0x290 fs/namespace.c:1098
task_work_run+0x148/0x1c0 kernel/task_work.c:113
tracehook_notify_resume include/linux/tracehook.h:193 [inline]
exit_to_usermode_loop+0x251/0x2a0 arch/x86/entry/common.c:167
prepare_exit_to_usermode arch/x86/entry/common.c:198 [inline]
syscall_return_slowpath arch/x86/entry/common.c:271 [inline]
do_syscall_64+0x538/0x620 arch/x86/entry/common.c:296
entry_SYSCALL_64_after_hwframe+0x49/0xbe
-> #0 (&type->s_umount_key#49){++++}:
down_read+0x36/0x80 kernel/locking/rwsem.c:24
__get_super.part.0+0x209/0x2e0 fs/super.c:698
__get_super include/linux/spinlock.h:329 [inline]
get_super+0x2b/0x50 fs/super.c:727
fsync_bdev+0x14/0xc0 fs/block_dev.c:483
invalidate_partition+0x74/0xb0 block/genhd.c:1592
drop_partitions.isra.0+0x9c/0x190 block/partition-generic.c:454
rescan_partitions+0xab/0x970 block/partition-generic.c:527
bdev_disk_changed+0x179/0x1b0 fs/block_dev.c:1435
__blkdev_get+0x1282/0x1480 fs/block_dev.c:1561
blkdev_get+0x48f/0x940 fs/block_dev.c:1627
blkdev_get_by_path+0x48/0xd0 fs/block_dev.c:1708
mount_bdev+0x5b/0x3b0 fs/super.c:1116
mount_fs+0xa3/0x310 fs/super.c:1261
vfs_kern_mount.part.0+0x68/0x470 fs/namespace.c:961
vfs_kern_mount fs/namespace.c:951 [inline]
do_new_mount fs/namespace.c:2492 [inline]
do_mount+0x115c/0x2f50 fs/namespace.c:2822
ksys_mount+0xcf/0x130 fs/namespace.c:3038
__do_sys_mount fs/namespace.c:3052 [inline]
__se_sys_mount fs/namespace.c:3049 [inline]
__x64_sys_mount+0xba/0x150 fs/namespace.c:3049
do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293
entry_SYSCALL_64_after_hwframe+0x49/0xbe
other info that might help us debug this:
Possible unsafe locking scenario:
CPU0 CPU1
---- ----
lock(&bdev->bd_mutex);
lock(&type->s_umount_key#49);
lock(&bdev->bd_mutex);
lock(&type->s_umount_key#49);
*** DEADLOCK ***
1 lock held by syz-executor.0/3470:
#0: 00000000b149477b (&bdev->bd_mutex){+.+.}, at: __blkdev_get+0x1d0/0x1480 fs/block_dev.c:1478
stack backtrace:
CPU: 1 PID: 3470 Comm: syz-executor.0 Not tainted 4.19.211-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/26/2022
Call Trace:
__dump_stack lib/dump_stack.c:77 [inline]
dump_stack+0x1fc/0x2ef lib/dump_stack.c:118
print_circular_bug.constprop.0.cold+0x2d7/0x41e kernel/locking/lockdep.c:1222
check_prev_add kernel/locking/lockdep.c:1866 [inline]
check_prevs_add kernel/locking/lockdep.c:1979 [inline]
validate_chain kernel/locking/lockdep.c:2420 [inline]
__lock_acquire+0x30c9/0x3ff0 kernel/locking/lockdep.c:3416
lock_acquire+0x170/0x3c0 kernel/locking/lockdep.c:3908
down_read+0x36/0x80 kernel/locking/rwsem.c:24
__get_super.part.0+0x209/0x2e0 fs/super.c:698
__get_super include/linux/spinlock.h:329 [inline]
get_super+0x2b/0x50 fs/super.c:727
fsync_bdev+0x14/0xc0 fs/block_dev.c:483
invalidate_partition+0x74/0xb0 block/genhd.c:1592
drop_partitions.isra.0+0x9c/0x190 block/partition-generic.c:454
rescan_partitions+0xab/0x970 block/partition-generic.c:527
bdev_disk_changed+0x179/0x1b0 fs/block_dev.c:1435
__blkdev_get+0x1282/0x1480 fs/block_dev.c:1561
blkdev_get+0x48f/0x940 fs/block_dev.c:1627
blkdev_get_by_path+0x48/0xd0 fs/block_dev.c:1708
mount_bdev+0x5b/0x3b0 fs/super.c:1116
mount_fs+0xa3/0x310 fs/super.c:1261
vfs_kern_mount.part.0+0x68/0x470 fs/namespace.c:961
vfs_kern_mount fs/namespace.c:951 [inline]
do_new_mount fs/namespace.c:2492 [inline]
do_mount+0x115c/0x2f50 fs/namespace.c:2822
ksys_mount+0xcf/0x130 fs/namespace.c:3038
__do_sys_mount fs/namespace.c:3052 [inline]
__se_sys_mount fs/namespace.c:3049 [inline]
__x64_sys_mount+0xba/0x150 fs/namespace.c:3049
do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293
entry_SYSCALL_64_after_hwframe+0x49/0xbe
RIP: 0033:0x7f79c46790a9
Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 f1 19 00 00 90 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 b8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007f79c2ba9168 EFLAGS: 00000246 ORIG_RAX: 00000000000000a5
RAX: ffffffffffffffda RBX: 00007f79c4799120 RCX: 00007f79c46790a9
RDX: 0000000020000240 RSI: 0000000020000200 RDI: 0000000020000000
RBP: 00007f79c46d4ae9 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007ffea2520f4f R14: 00007f79c2ba9300 R15: 0000000000022000
REISERFS warning (device nbd0): sh-2021 reiserfs_fill_super: can not find reiserfs on nbd0
netlink: 'syz-executor.3': attribute type 33 has an invalid length.
REISERFS warning (device nbd0): reiserfs_fill_super: Cannot allocate commit workqueue
netlink: 'syz-executor.3': attribute type 33 has an invalid length.
audit: type=1800 audit(1671998514.540:752): pid=3658 uid=0 auid=4294967295 ses=4294967295 subj==unconfined op=collect_data cause=failed(directio) comm="syz-executor.5" name="bus" dev="sda1" ino=14407 res=0
audit: type=1800 audit(1671998514.630:753): pid=3697 uid=0 auid=4294967295 ses=4294967295 subj==unconfined op=collect_data cause=failed(directio) comm="syz-executor.5" name="bus" dev="sda1" ino=14407 res=0
audit: type=1800 audit(1671998515.280:754): pid=3710 uid=0 auid=4294967295 ses=4294967295 subj==unconfined op=collect_data cause=failed(directio) comm="syz-executor.5" name="bus" dev="sda1" ino=14401 res=0
F2FS-fs (loop2): invalid crc value
F2FS-fs (loop2): Found nat_bits in checkpoint
F2FS-fs (loop2): f2fs_check_nid_range: out-of-range nid=2, run fsck to fix.
F2FS-fs (loop2): Mounted with checkpoint version = 48b305e4
audit: type=1800 audit(1671998515.930:755): pid=3689 uid=0 auid=4294967295 ses=4294967295 subj==unconfined op=collect_data cause=failed(directio) comm="syz-executor.2" name="bus" dev="loop2" ino=10 res=0
audit: type=1804 audit(1671998515.950:756): pid=3689 uid=0 auid=4294967295 ses=4294967295 subj==unconfined op=invalid_pcr cause=open_writers comm="syz-executor.2" name="/root/syzkaller-testdir71973728/syzkaller.KuDzts/602/file0/bus" dev="loop2" ino=10 res=1
---
This report is generated by a bot. It may contain errors.
See
https://goo.gl/tpsmEJ for more information about syzbot.
syzbot engineers can be reached at
syzk...@googlegroups.com.
syzbot will keep track of this issue. See:
https://goo.gl/tpsmEJ#status for how to communicate with syzbot.