[moderation] [block?] KCSAN: data-race in bdev_disk_changed / bdev_set_nr_sectors (2)

2 views
Skip to first unread message

syzbot

unread,
Feb 5, 2024, 8:45:38 AMFeb 5
to syzkaller-upst...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: 54be6c6c5ae8 Linux 6.8-rc3
git tree: upstream
console output: https://syzkaller.appspot.com/x/log.txt?x=12e423c0180000
kernel config: https://syzkaller.appspot.com/x/.config?x=3cd0dc1b46a5bc5c
dashboard link: https://syzkaller.appspot.com/bug?extid=9000ad87eab6dd191b93
compiler: Debian clang version 15.0.6, GNU ld (GNU Binutils for Debian) 2.40
CC: [ax...@kernel.dk linux...@vger.kernel.org linux-...@vger.kernel.org]

Unfortunately, I don't have any reproducer for this issue yet.

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/148fa7492b49/disk-54be6c6c.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/cfb5e0d97c64/vmlinux-54be6c6c.xz
kernel image: https://storage.googleapis.com/syzbot-assets/4eff3a827e09/bzImage-54be6c6c.xz

IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: syzbot+9000ad...@syzkaller.appspotmail.com

==================================================================
BUG: KCSAN: data-race in bdev_disk_changed / bdev_set_nr_sectors

write to 0xffff888100631908 of 8 bytes by task 7292 on cpu 1:
bdev_set_nr_sectors+0x50/0x70 block/bdev.c:428
set_capacity block/genhd.c:61 [inline]
set_capacity_and_notify+0x6e/0x170 block/genhd.c:74
loop_set_size+0x2e/0x70 drivers/block/loop.c:235
loop_configure+0xaf9/0xca0 drivers/block/loop.c:1096
lo_ioctl+0x682/0x12e0
blkdev_ioctl+0x375/0x460 block/ioctl.c:634
vfs_ioctl fs/ioctl.c:51 [inline]
__do_sys_ioctl fs/ioctl.c:871 [inline]
__se_sys_ioctl+0xcf/0x140 fs/ioctl.c:857
__x64_sys_ioctl+0x43/0x50 fs/ioctl.c:857
do_syscall_x64 arch/x86/entry/common.c:52 [inline]
do_syscall_64+0xcd/0x1d0 arch/x86/entry/common.c:83
entry_SYSCALL_64_after_hwframe+0x63/0x6b

read to 0xffff888100631908 of 8 bytes by task 4463 on cpu 0:
bdev_nr_sectors include/linux/blkdev.h:744 [inline]
get_capacity include/linux/blkdev.h:754 [inline]
bdev_disk_changed+0x2a0/0xbe0 block/partitions/core.c:696
blkdev_get_whole+0x227/0x240 block/bdev.c:661
bdev_open_by_dev+0x28a/0x5e0 block/bdev.c:871
blkdev_open+0xfb/0x200 block/fops.c:615
do_dentry_open+0x637/0xbd0 fs/open.c:953
vfs_open+0x4a/0x50 fs/open.c:1087
do_open fs/namei.c:3641 [inline]
path_openat+0x1821/0x1d40 fs/namei.c:3798
do_filp_open+0xf6/0x200 fs/namei.c:3825
do_sys_openat2+0xab/0x110 fs/open.c:1404
do_sys_open fs/open.c:1419 [inline]
__do_sys_openat fs/open.c:1435 [inline]
__se_sys_openat fs/open.c:1430 [inline]
__x64_sys_openat+0xf3/0x120 fs/open.c:1430
do_syscall_x64 arch/x86/entry/common.c:52 [inline]
do_syscall_64+0xcd/0x1d0 arch/x86/entry/common.c:83
entry_SYSCALL_64_after_hwframe+0x63/0x6b

value changed: 0x0000000000000000 -> 0x00000000000002e0

Reported by Kernel Concurrency Sanitizer on:
CPU: 0 PID: 4463 Comm: udevd Not tainted 6.8.0-rc3-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/25/2024
==================================================================
blk_print_req_error: 19 callbacks suppressed
I/O error, dev loop4, sector 0 op 0x0:(READ) flags 0x80700 phys_seg 1 prio class 0
I/O error, dev loop4, sector 0 op 0x0:(READ) flags 0x80700 phys_seg 1 prio class 0
I/O error, dev loop4, sector 0 op 0x0:(READ) flags 0x80700 phys_seg 1 prio class 0
I/O error, dev loop4, sector 0 op 0x0:(READ) flags 0x80700 phys_seg 1 prio class 0
I/O error, dev loop4, sector 0 op 0x0:(READ) flags 0x80700 phys_seg 1 prio class 0
I/O error, dev loop4, sector 0 op 0x0:(READ) flags 0x80700 phys_seg 1 prio class 0
I/O error, dev loop4, sector 0 op 0x0:(READ) flags 0x80700 phys_seg 1 prio class 0
I/O error, dev loop4, sector 0 op 0x0:(READ) flags 0x80700 phys_seg 1 prio class 0
I/O error, dev loop4, sector 0 op 0x0:(READ) flags 0x80700 phys_seg 1 prio class 0
I/O error, dev loop4, sector 0 op 0x0:(READ) flags 0x80700 phys_seg 1 prio class 0


---
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.

If the report is already addressed, let syzbot know by replying with:
#syz fix: exact-commit-title

If you want to overwrite report's subsystems, reply with:
#syz set subsystems: new-subsystem
(See the list of subsystem names on the web dashboard)

If the report is a duplicate of another one, reply with:
#syz dup: exact-subject-of-another-report

If you want to undo deduplication, reply with:
#syz undup

syzbot

unread,
Mar 31, 2024, 3:37:17 PMMar 31
to syzkaller-upst...@googlegroups.com
Auto-closing this bug as obsolete.
Crashes did not happen for a while, no reproducer and no activity.
Reply all
Reply to author
Forward
0 new messages