syzbot


KCSAN: data-race in __lru_add_drain_all / folio_mark_accessed (4)

Status: auto-closed as invalid on 2022/09/26 04:17
Subsystems: mm
[Documentation on labels]
First crash: 637d, last: 612d
Similar bugs (3)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KCSAN: data-race in __lru_add_drain_all / folio_mark_accessed mm 1 903d 903d 0/26 auto-closed as invalid on 2021/12/08 15:49
upstream KCSAN: data-race in __lru_add_drain_all / folio_mark_accessed (2) mm 1 810d 810d 0/26 auto-closed as invalid on 2022/03/11 22:51
upstream KCSAN: data-race in __lru_add_drain_all / folio_mark_accessed (3) mm 5 675d 757d 0/26 auto-closed as invalid on 2022/07/24 19:42

Sample crash report:
==================================================================
BUG: KCSAN: data-race in __lru_add_drain_all / folio_mark_accessed

read-write to 0xffff888237d27bc0 of 1 bytes by task 11875 on cpu 1:
 folio_batch_add include/linux/pagevec.h:129 [inline]
 folio_batch_add_and_move mm/swap.c:260 [inline]
 folio_activate mm/swap.c:378 [inline]
 folio_mark_accessed+0x1fe/0x350 mm/swap.c:459
 do_read_cache_folio+0x37e/0x3f0 mm/filemap.c:3528
 read_cache_folio+0x36/0x40 mm/filemap.c:3551
 read_mapping_folio include/linux/pagemap.h:762 [inline]
 read_part_sector+0x76/0x1e0 block/partitions/core.c:714
 msdos_partition+0xa5/0x1b80 block/partitions/msdos.c:592
 check_partition block/partitions/core.c:146 [inline]
 blk_add_partitions block/partitions/core.c:599 [inline]
 bdev_disk_changed+0x40d/0xc30 block/partitions/core.c:685
 blkdev_get_whole+0x256/0x270 block/bdev.c:684
 blkdev_get_by_dev+0x248/0x650 block/bdev.c:821
 blkdev_get_by_path+0x117/0x220 block/bdev.c:886
 get_tree_bdev+0x7d/0x3b0 fs/super.c:1271
 ext4_get_tree+0x18/0x20 fs/ext4/super.c:5547
 vfs_get_tree+0x49/0x190 fs/super.c:1530
 do_new_mount+0x200/0x650 fs/namespace.c:3040
 path_mount+0x4ad/0xbb0 fs/namespace.c:3370
 do_mount fs/namespace.c:3383 [inline]
 __do_sys_mount fs/namespace.c:3591 [inline]
 __se_sys_mount+0x281/0x2d0 fs/namespace.c:3568
 __x64_sys_mount+0x63/0x70 fs/namespace.c:3568
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x2b/0x70 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x63/0xcd

read to 0xffff888237d27bc0 of 1 bytes by task 11873 on cpu 0:
 folio_batch_count include/linux/pagevec.h:108 [inline]
 cpu_needs_drain mm/swap.c:778 [inline]
 __lru_add_drain_all+0x301/0x450 mm/swap.c:867
 lru_add_drain_all+0xc/0x10 mm/swap.c:883
 invalidate_bdev+0x56/0x80 block/bdev.c:85
 invalidate_disk+0x25/0xb0 block/genhd.c:672
 __loop_clr_fd+0x176/0x3c0 drivers/block/loop.c:1159
 loop_clr_fd drivers/block/loop.c:1252 [inline]
 lo_ioctl+0xd8c/0x1290 drivers/block/loop.c:1558
 blkdev_ioctl+0x20e/0x440 block/ioctl.c:614
 vfs_ioctl fs/ioctl.c:51 [inline]
 __do_sys_ioctl fs/ioctl.c:870 [inline]
 __se_sys_ioctl+0xcb/0x140 fs/ioctl.c:856
 __x64_sys_ioctl+0x3f/0x50 fs/ioctl.c:856
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x2b/0x70 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x63/0xcd

value changed: 0x00 -> 0x01

Reported by Kernel Concurrency Sanitizer on:
CPU: 0 PID: 11873 Comm: syz-executor.5 Not tainted 6.0.0-rc1-syzkaller-00409-ge3f259d33c0e-dirty #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/22/2022
==================================================================

Crashes (3):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2022/08/22 04:07 upstream e3f259d33c0e 26a13b38 .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in __lru_add_drain_all / folio_mark_accessed
2022/08/20 23:58 upstream f31c32efd57c 26a13b38 .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in __lru_add_drain_all / folio_mark_accessed
2022/07/28 02:42 upstream 6e7765cb477a fb95c74d .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in __lru_add_drain_all / folio_mark_accessed
* Struck through repros no longer work on HEAD.