syzbot


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

Status: auto-closed as invalid on 2022/07/24 19:42
Subsystems: mm
[Documentation on labels]
First crash: 759d, last: 677d
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 905d 905d 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 812d 812d 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 639d 0/26 auto-closed as invalid on 2022/09/26 04:17

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

read-write to 0xffff888237d27b68 of 1 bytes by task 1913 on cpu 1:
 pagevec_add include/linux/pagevec.h:75 [inline]
 pagevec_add_and_need_flush mm/swap.c:234 [inline]
 folio_activate mm/swap.c:354 [inline]
 folio_mark_accessed+0x1fe/0x380 mm/swap.c:436
 mark_page_accessed+0x3b/0xe0 mm/folio-compat.c:50
 shmem_file_read_iter+0x27d/0x6a0 mm/shmem.c:2598
 call_read_iter include/linux/fs.h:2052 [inline]
 new_sync_read fs/read_write.c:401 [inline]
 vfs_read+0x5a5/0x6a0 fs/read_write.c:482
 ksys_read+0xe8/0x1a0 fs/read_write.c:620
 __do_sys_read fs/read_write.c:630 [inline]
 __se_sys_read fs/read_write.c:628 [inline]
 __x64_sys_read+0x3e/0x50 fs/read_write.c:628
 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+0x46/0xb0

read to 0xffff888237d27b68 of 1 bytes by task 1444 on cpu 0:
 pagevec_count include/linux/pagevec.h:62 [inline]
 need_activate_page_drain mm/swap.c:342 [inline]
 __lru_add_drain_all+0x229/0x3e0 mm/swap.c:831
 lru_add_drain_all+0xc/0x10 mm/swap.c:849
 invalidate_bdev+0x56/0x80 block/bdev.c:87
 bdev_disk_changed+0xed/0xc30 block/partitions/core.c:666
 blkdev_get_whole block/bdev.c:686 [inline]
 blkdev_get_by_dev+0x3c0/0x9c0 block/bdev.c:823
 blkdev_open+0xac/0x140 block/fops.c:481
 do_dentry_open+0x521/0x850 fs/open.c:848
 vfs_open+0x43/0x50 fs/open.c:981
 do_open fs/namei.c:3520 [inline]
 path_openat+0x16cf/0x1b30 fs/namei.c:3653
 do_filp_open+0x105/0x220 fs/namei.c:3680
 do_sys_openat2+0xb5/0x2a0 fs/open.c:1278
 do_sys_open fs/open.c:1294 [inline]
 __do_sys_openat fs/open.c:1310 [inline]
 __se_sys_openat fs/open.c:1305 [inline]
 __x64_sys_openat+0xef/0x110 fs/open.c:1305
 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+0x46/0xb0

value changed: 0x00 -> 0x01

Reported by Kernel Concurrency Sanitizer on:
CPU: 0 PID: 1444 Comm: udevd Not tainted 5.19.0-rc2-syzkaller-00302-g05c6ca8512f2-dirty #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
==================================================================

Crashes (5):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2022/06/19 19:39 upstream 05c6ca8512f2 8f633d84 .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in __lru_add_drain_all / folio_mark_accessed
2022/05/21 08:43 upstream 3b5e1590a267 7268fa62 .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in __lru_add_drain_all / folio_mark_accessed
2022/04/23 12:06 upstream c00c5e1d157b 131df97d .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in __lru_add_drain_all / folio_mark_accessed
2022/04/21 14:28 upstream b253435746d9 d4befee1 .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in __lru_add_drain_all / folio_mark_accessed
2022/03/29 19:25 upstream 1930a6e739c4 6bdac766 .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.