syzbot


KCSAN: data-race in bdev_set_nr_sectors / force_page_cache_ra (4)

Status: auto-obsoleted due to no activity on 2024/03/13 10:47
Subsystems: block
[Documentation on labels]
Reported-by: syzbot+cef0473d584b13e01615@syzkaller.appspotmail.com
First crash: 97d, last: 67d
Similar bugs (3)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KCSAN: data-race in bdev_set_nr_sectors / force_page_cache_ra (2) block 1 221d 221d 0/26 auto-obsoleted due to no activity on 2023/10/11 12:43
upstream KCSAN: data-race in bdev_set_nr_sectors / force_page_cache_ra (3) block 1 136d 125d 0/26 auto-obsoleted due to no activity on 2024/01/04 14:32
upstream KCSAN: data-race in bdev_set_nr_sectors / force_page_cache_ra block 1 306d 306d 0/26 closed as invalid on 2023/07/18 16:03

Sample crash report:
==================================================================
BUG: KCSAN: data-race in bdev_set_nr_sectors / force_page_cache_ra

write to 0xffff8881006335f0 of 8 bytes by task 21422 on cpu 1:
 i_size_write include/linux/fs.h:932 [inline]
 bdev_set_nr_sectors+0x42/0x70 block/bdev.c:427
 set_capacity block/genhd.c:61 [inline]
 set_capacity_and_notify+0x6e/0x170 block/genhd.c:74
 loop_set_size drivers/block/loop.c:235 [inline]
 loop_set_status+0x397/0x540 drivers/block/loop.c:1299
 lo_ioctl+0x892/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 0xffff8881006335f0 of 8 bytes by task 21372 on cpu 0:
 i_size_read include/linux/fs.h:910 [inline]
 do_page_cache_ra mm/readahead.c:286 [inline]
 force_page_cache_ra+0x126/0x1d0 mm/readahead.c:330
 force_page_cache_readahead mm/internal.h:130 [inline]
 generic_fadvise+0x2c7/0x460 mm/fadvise.c:106
 vfs_fadvise+0x73/0x80 mm/fadvise.c:185
 ksys_readahead mm/readahead.c:740 [inline]
 __do_sys_readahead mm/readahead.c:748 [inline]
 __se_sys_readahead mm/readahead.c:746 [inline]
 __x64_sys_readahead+0x13d/0x190 mm/readahead.c:746
 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 -> 0x000000000003fe00

Reported by Kernel Concurrency Sanitizer on:
CPU: 0 PID: 21372 Comm: syz-executor.3 Not tainted 6.8.0-rc3-syzkaller-00010-g6d280f4d760e #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/25/2024
==================================================================

Crashes (3):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/02/07 10:46 upstream 6d280f4d760e 6404acf9 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in bdev_set_nr_sectors / force_page_cache_ra
2024/01/20 07:05 upstream 9d64bf433c53 9bd8dcda .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in bdev_set_nr_sectors / force_page_cache_ra
2024/01/08 15:21 upstream 0dd3ee311255 d0304e9c .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in bdev_set_nr_sectors / force_page_cache_ra
* Struck through repros no longer work on HEAD.