syzbot


KCSAN: data-race in __lru_add_drain_all / mark_page_accessed

Status: auto-closed as invalid on 2021/11/08 10:53
Reported-by: syzbot+@syzkaller.appspotmail.com
First crash: 550d, last: 425d

Sample crash report:
loop1: detected capacity change from 0 to 1
EXT4-fs (loop1): unable to read superblock
==================================================================
BUG: KCSAN: data-race in __lru_add_drain_all / mark_page_accessed

write to 0xffff888237d22728 of 1 bytes by task 31659 on cpu 1:
 pagevec_add include/linux/pagevec.h:74 [inline]
 pagevec_add_and_need_flush mm/swap.c:222 [inline]
 activate_page mm/swap.c:337 [inline]
 mark_page_accessed+0x36e/0x550 mm/swap.c:422
 shmem_file_read_iter+0x2fd/0x5d0 mm/shmem.c:2587
 call_read_iter include/linux/fs.h:2157 [inline]
 new_sync_read fs/read_write.c:404 [inline]
 vfs_read+0x66c/0x750 fs/read_write.c:485
 ksys_read+0xd9/0x190 fs/read_write.c:623
 __do_sys_read fs/read_write.c:633 [inline]
 __se_sys_read fs/read_write.c:631 [inline]
 __x64_sys_read+0x3e/0x50 fs/read_write.c:631
 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 0xffff888237d22728 of 1 bytes by task 2521 on cpu 0:
 pagevec_count include/linux/pagevec.h:61 [inline]
 need_activate_page_drain mm/swap.c:325 [inline]
 __lru_add_drain_all+0x236/0x3e0 mm/swap.c:824
 lru_add_drain_all+0xc/0x10 mm/swap.c:841
 invalidate_bdev+0x56/0x80 block/bdev.c:87
 __loop_clr_fd+0x521/0x850 drivers/block/loop.c:1399
 loop_clr_fd drivers/block/loop.c:1494 [inline]
 lo_ioctl+0xac5/0x13e0 drivers/block/loop.c:1850
 blkdev_ioctl+0x1d0/0x3f0 block/ioctl.c:589
 block_ioctl+0x6e/0x80 block/fops.c:478
 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: 0 PID: 2521 Comm: syz-executor.1 Not tainted 5.15.0-rc4-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
==================================================================

Crashes (13):
Manager Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Title
ci2-upstream-kcsan-gce 2021/10/04 10:53 upstream 9e1ff307c779 ce697b49 .config log report info KCSAN: data-race in __lru_add_drain_all / mark_page_accessed
ci2-upstream-kcsan-gce 2021/09/30 00:44 upstream 02d5e016800d be530f6c .config log report info KCSAN: data-race in __lru_add_drain_all / mark_page_accessed
ci2-upstream-kcsan-gce 2021/09/02 12:34 upstream 4ac6d90867a4 d0f0970b .config log report info KCSAN: data-race in __lru_add_drain_all / mark_page_accessed
ci2-upstream-kcsan-gce 2021/08/30 12:47 upstream 7d2a07b76933 8f58a0ef .config log report info KCSAN: data-race in __lru_add_drain_all / mark_page_accessed
ci2-upstream-kcsan-gce 2021/08/28 21:20 upstream 3f5ad13cb012 be2c130d .config log report info KCSAN: data-race in __lru_add_drain_all / mark_page_accessed
ci2-upstream-kcsan-gce 2021/08/26 00:00 upstream fe67f4dd8daa b599f2fc .config log report info KCSAN: data-race in __lru_add_drain_all / mark_page_accessed
ci2-upstream-kcsan-gce 2021/08/24 03:52 upstream d5ae8d7f85b7 b599f2fc .config log report info KCSAN: data-race in __lru_add_drain_all / mark_page_accessed
ci2-upstream-kcsan-gce 2021/08/14 20:11 upstream ba31f97d43be 2489ab88 .config log report info KCSAN: data-race in __lru_add_drain_all / mark_page_accessed
ci2-upstream-kcsan-gce 2021/07/30 00:46 upstream 7e96bf476270 8a799410 .config log report info KCSAN: data-race in __lru_add_drain_all / mark_page_accessed
ci2-upstream-kcsan-gce 2021/07/07 11:49 upstream 3dbdb38e2869 4846d5c1 .config log report info KCSAN: data-race in __lru_add_drain_all / mark_page_accessed
ci2-upstream-kcsan-gce 2021/06/09 15:17 upstream 368094df48e6 84fe5d96 .config log report info KCSAN: data-race in __lru_add_drain_all / mark_page_accessed
ci2-upstream-kcsan-gce 2021/06/06 02:23 upstream f5b6eb1e0182 500c2339 .config log report info KCSAN: data-race in __lru_add_drain_all / mark_page_accessed
ci2-upstream-kcsan-gce 2021/05/31 19:50 upstream c2131f7e73c9 032639db .config log report info KCSAN: data-race in __lru_add_drain_all / mark_page_accessed
* Struck through repros no longer work on HEAD.