syzbot


KCSAN: data-race in __filemap_add_folio / invalidate_bdev

Status: auto-closed as invalid on 2022/07/28 00:49
Subsystems: fs mm
[Documentation on labels]
First crash: 698d, last: 663d
Similar bugs (5)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KCSAN: data-race in __filemap_add_folio / invalidate_bdev (4) fs mm 4 240d 270d 0/26 auto-obsoleted due to no activity on 2023/09/24 05:15
upstream KCSAN: data-race in __filemap_add_folio / invalidate_bdev (5) fs mm 4 105d 126d 0/26 auto-obsoleted due to no activity on 2024/02/05 20:23
upstream KCSAN: data-race in __filemap_add_folio / invalidate_bdev (3) block 1 365d 358d 0/26 auto-obsoleted due to no activity on 2023/05/21 22:53
upstream KCSAN: data-race in __filemap_add_folio / invalidate_bdev (2) fs mm 2 566d 593d 0/26 auto-obsoleted due to no activity on 2022/11/01 13:37
upstream KCSAN: data-race in __filemap_add_folio / invalidate_bdev (6) fs mm 1 23d 23d 0/26 moderation: reported on 2024/03/24 09:19

Sample crash report:
==================================================================
BUG: KCSAN: data-race in __filemap_add_folio / invalidate_bdev

read-write to 0xffff888102792648 of 8 bytes by task 21053 on cpu 1:
 __filemap_add_folio+0x2d9/0x7f0 mm/filemap.c:904
 filemap_add_folio+0x6b/0x150 mm/filemap.c:959
 page_cache_ra_unbounded+0x19e/0x2e0 mm/readahead.c:245
 do_page_cache_ra mm/readahead.c:293 [inline]
 force_page_cache_ra+0x1c6/0x200 mm/readahead.c:324
 page_cache_sync_ra+0xc8/0xf0 mm/readahead.c:693
 page_cache_sync_readahead include/linux/pagemap.h:1234 [inline]
 filemap_get_pages mm/filemap.c:2592 [inline]
 filemap_read+0x3e5/0x1400 mm/filemap.c:2679
 blkdev_read_iter+0x2c6/0x370 block/fops.c:594
 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 0xffff888102792648 of 8 bytes by task 1828 on cpu 0:
 invalidate_bdev+0x31/0x80 block/bdev.c:85
 ext4_put_super+0x510/0x810 fs/ext4/super.c:1279
 generic_shutdown_super+0xd5/0x240 fs/super.c:462
 kill_block_super+0x4a/0x90 fs/super.c:1394
 deactivate_locked_super+0x6a/0xb0 fs/super.c:332
 deactivate_super+0x85/0x90 fs/super.c:363
 cleanup_mnt+0x267/0x2d0 fs/namespace.c:1186
 __cleanup_mnt+0x15/0x20 fs/namespace.c:1193
 task_work_run+0x8e/0x110 kernel/task_work.c:177
 resume_user_mode_work include/linux/resume_user_mode.h:49 [inline]
 exit_to_user_mode_loop+0x124/0x130 kernel/entry/common.c:169
 exit_to_user_mode_prepare kernel/entry/common.c:201 [inline]
 __syscall_exit_to_user_mode_work kernel/entry/common.c:283 [inline]
 syscall_exit_to_user_mode+0x6a/0x90 kernel/entry/common.c:294
 do_syscall_64+0x37/0x70 arch/x86/entry/common.c:86
 entry_SYSCALL_64_after_hwframe+0x46/0xb0

value changed: 0x0000000000000015 -> 0x0000000000000016

Reported by Kernel Concurrency Sanitizer on:
CPU: 0 PID: 1828 Comm: syz-executor.3 Not tainted 5.19.0-rc3-syzkaller-00043-g3abc3ae553c7-dirty #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
==================================================================

Crashes (3):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2022/06/23 00:45 upstream 3abc3ae553c7 912f5df7 .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in __filemap_add_folio / invalidate_bdev
2022/06/09 17:23 upstream 6bfb56e93bce 0d5abf15 .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in __filemap_add_folio / invalidate_bdev
2022/05/18 16:49 upstream ef1302160bfb 50c53f39 .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in __filemap_add_folio / invalidate_bdev
* Struck through repros no longer work on HEAD.