syzbot


KCSAN: data-race in __lru_add_drain_all / folio_mark_accessed

Status: auto-closed as invalid on 2021/12/08 15:49
Subsystems: mm
[Documentation on labels]
First crash: 904d, last: 904d
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 (2) mm 1 811d 811d 0/26 auto-closed as invalid on 2022/03/11 22:51
upstream KCSAN: data-race in __lru_add_drain_all / folio_mark_accessed (4) mm 3 613d 638d 0/26 auto-closed as invalid on 2022/09/26 04:17
upstream KCSAN: data-race in __lru_add_drain_all / folio_mark_accessed (3) mm 5 676d 758d 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

write to 0xffff888237c268a8 of 1 bytes by task 6315 on cpu 0:
 pagevec_add include/linux/pagevec.h:74 [inline]
 pagevec_add_and_need_flush mm/swap.c:226 [inline]
 folio_activate mm/swap.c:346 [inline]
 folio_mark_accessed+0x206/0x380 mm/swap.c:428
 mark_page_accessed+0x37/0x50 mm/folio-compat.c:49
 shmem_file_read_iter+0x2fd/0x5d0 mm/shmem.c:2589
 call_read_iter include/linux/fs.h:2155 [inline]
 new_sync_read fs/read_write.c:400 [inline]
 vfs_read+0x66c/0x750 fs/read_write.c:481
 ksys_read+0xd9/0x190 fs/read_write.c:619
 __do_sys_read fs/read_write.c:629 [inline]
 __se_sys_read fs/read_write.c:627 [inline]
 __x64_sys_read+0x3e/0x50 fs/read_write.c:627
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x44/0xa0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x44/0xae

read to 0xffff888237c268a8 of 1 bytes by task 9129 on cpu 1:
 pagevec_count include/linux/pagevec.h:61 [inline]
 need_activate_page_drain mm/swap.c:334 [inline]
 __lru_add_drain_all+0x236/0x3e0 mm/swap.c:830
 lru_add_drain_all+0xc/0x10 mm/swap.c:847
 invalidate_bdev+0x56/0x80 block/bdev.c:88
 invalidate_disk+0x25/0xb0 block/genhd.c:644
 __loop_clr_fd+0x41f/0x6c0 drivers/block/loop.c:1147
 loop_clr_fd drivers/block/loop.c:1237 [inline]
 lo_ioctl+0x985/0x1270 drivers/block/loop.c:1562
 blkdev_ioctl+0x20e/0x440 block/ioctl.c:597
 vfs_ioctl fs/ioctl.c:51 [inline]
 __do_sys_ioctl fs/ioctl.c:874 [inline]
 __se_sys_ioctl+0xcb/0x140 fs/ioctl.c:860
 __x64_sys_ioctl+0x3f/0x50 fs/ioctl.c:860
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x44/0xa0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x44/0xae

value changed: 0x00 -> 0x01

Reported by Kernel Concurrency Sanitizer on:
CPU: 1 PID: 9129 Comm: syz-executor.0 Not tainted 5.15.0-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
==================================================================

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2021/11/03 15:39 upstream dcd68326d29b 4c1be0be .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.