syzbot


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

Status: auto-closed as invalid on 2022/03/11 22:51
Reported-by: syzbot+@syzkaller.appspotmail.com
First crash: 301d, last: 301d
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 1 394d 394d 0/24 auto-closed as invalid on 2021/12/08 15:49
upstream KCSAN: data-race in __lru_add_drain_all / folio_mark_accessed (4) 3 103d 128d 0/24 auto-closed as invalid on 2022/09/26 04:17
upstream KCSAN: data-race in __lru_add_drain_all / folio_mark_accessed (3) 5 166d 248d 0/24 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 0xffff888237c27b98 of 1 bytes by task 2435 on cpu 0:
 pagevec_add include/linux/pagevec.h:75 [inline]
 pagevec_add_and_need_flush mm/swap.c:236 [inline]
 folio_activate mm/swap.c:356 [inline]
 folio_mark_accessed+0x206/0x380 mm/swap.c:438
 mark_page_accessed+0x37/0x50 mm/folio-compat.c:49
 shmem_file_read_iter+0x2fd/0x5d0 mm/shmem.c:2573
 call_read_iter include/linux/fs.h:2068 [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/0xd0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x44/0xae

read to 0xffff888237c27b98 of 1 bytes by task 16675 on cpu 1:
 pagevec_count include/linux/pagevec.h:62 [inline]
 need_activate_page_drain mm/swap.c:344 [inline]
 __lru_add_drain_all+0x236/0x3e0 mm/swap.c:840
 lru_add_drain_all+0xc/0x10 mm/swap.c:857
 invalidate_bdev+0x56/0x80 block/bdev.c:87
 invalidate_disk+0x25/0xb0 block/genhd.c:651
 __loop_clr_fd+0x3d1/0x5d0 drivers/block/loop.c:1142
 loop_clr_fd drivers/block/loop.c:1231 [inline]
 lo_ioctl+0xa33/0x1280 drivers/block/loop.c:1558
 blkdev_ioctl+0x20e/0x440 block/ioctl.c:588
 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/0xd0 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: 16675 Comm: syz-executor.1 Not tainted 5.17.0-rc2-syzkaller-00293-g86286e486cbd-dirty #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
==================================================================

Crashes (1):
Manager Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Title
ci2-upstream-kcsan-gce 2022/02/04 22:50 upstream 86286e486cbd e13a05ed .config log report info KCSAN: data-race in __lru_add_drain_all / folio_mark_accessed
* Struck through repros no longer work on HEAD.