syzbot


KCSAN: data-race in __filemap_add_folio / invalidate_bdev (5)

Status: auto-obsoleted due to no activity on 2024/02/05 20:23
Subsystems: fs mm
[Documentation on labels]
Reported-by: syzbot+a362f0a0d696b6c60f69@syzkaller.appspotmail.com
First crash: 156d, last: 126d
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 fs mm 3 683d 719d 0/26 auto-closed as invalid on 2022/07/28 00:49
upstream KCSAN: data-race in __filemap_add_folio / invalidate_bdev (4) fs mm 4 260d 291d 0/26 auto-obsoleted due to no activity on 2023/09/24 05:15
upstream KCSAN: data-race in __filemap_add_folio / invalidate_bdev (3) block 1 386d 378d 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 587d 613d 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 43d 43d 0/26 auto-obsoleted due to no activity on 2024/04/28 09:19

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

read-write to 0xffff888100630bb0 of 8 bytes by task 13185 on cpu 1:
 __filemap_add_folio+0x4c1/0x730 mm/filemap.c:902
 filemap_add_folio+0x70/0x160 mm/filemap.c:937
 page_cache_ra_unbounded+0x15e/0x2e0 mm/readahead.c:250
 do_page_cache_ra mm/readahead.c:299 [inline]
 force_page_cache_ra mm/readahead.c:330 [inline]
 page_cache_sync_ra+0x24b/0x2a0 mm/readahead.c:691
 page_cache_sync_readahead include/linux/pagemap.h:1283 [inline]
 filemap_get_pages+0x251/0xf90 mm/filemap.c:2497
 filemap_read+0x214/0x680 mm/filemap.c:2593
 blkdev_read_iter+0x217/0x2c0 block/fops.c:742
 call_read_iter include/linux/fs.h:2014 [inline]
 new_sync_read fs/read_write.c:389 [inline]
 vfs_read+0x3c0/0x590 fs/read_write.c:470
 ksys_read+0xeb/0x1a0 fs/read_write.c:613
 __do_sys_read fs/read_write.c:623 [inline]
 __se_sys_read fs/read_write.c:621 [inline]
 __x64_sys_read+0x42/0x50 fs/read_write.c:621
 do_syscall_x64 arch/x86/entry/common.c:52 [inline]
 do_syscall_64+0x44/0x110 arch/x86/entry/common.c:83
 entry_SYSCALL_64_after_hwframe+0x63/0x6b

read to 0xffff888100630bb0 of 8 bytes by task 3100 on cpu 0:
 invalidate_bdev+0x32/0x70 block/bdev.c:84
 ext4_put_super+0x51b/0x7e0 fs/ext4/super.c:1361
 generic_shutdown_super+0xdb/0x210 fs/super.c:696
 kill_block_super+0x2a/0x60 fs/super.c:1667
 ext4_kill_sb+0x44/0x80 fs/ext4/super.c:7330
 deactivate_locked_super+0x7a/0x1c0 fs/super.c:484
 deactivate_super+0x9b/0xb0 fs/super.c:517
 cleanup_mnt+0x272/0x2e0 fs/namespace.c:1256
 __cleanup_mnt+0x19/0x20 fs/namespace.c:1263
 task_work_run+0x135/0x1a0 kernel/task_work.c:180
 resume_user_mode_work include/linux/resume_user_mode.h:49 [inline]
 exit_to_user_mode_loop+0xd6/0xe0 kernel/entry/common.c:171
 exit_to_user_mode_prepare+0x6c/0xb0 kernel/entry/common.c:204
 __syscall_exit_to_user_mode_work kernel/entry/common.c:285 [inline]
 syscall_exit_to_user_mode+0x26/0x140 kernel/entry/common.c:296
 do_syscall_64+0x50/0x110 arch/x86/entry/common.c:89
 entry_SYSCALL_64_after_hwframe+0x63/0x6b

value changed: 0x0000000000000007 -> 0x0000000000000008

Reported by Kernel Concurrency Sanitizer on:
CPU: 0 PID: 3100 Comm: syz-executor.1 Not tainted 6.7.0-rc8-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 11/17/2023
==================================================================
EXT4-fs unmount: 662 callbacks suppressed
EXT4-fs (loop1): unmounting filesystem 00000000-0000-0000-0000-000000000000.
EXT4-fs (loop1): unmounting filesystem 00000000-0000-0000-0000-000000000000.
EXT4-fs (loop1): unmounting filesystem 00000000-0000-0000-0000-000000000000.
EXT4-fs (loop1): unmounting filesystem 00000000-0000-0000-0000-000000000000.
EXT4-fs (loop1): unmounting filesystem 00000000-0000-0000-0000-000000000000.
EXT4-fs (loop1): unmounting filesystem 00000000-0000-0000-0000-000000000000.
EXT4-fs (loop1): unmounting filesystem 00000000-0000-0000-0000-000000000000.

Crashes (4):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/01/01 20:22 upstream 610a9b8f49fb fb427a07 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __filemap_add_folio / invalidate_bdev
2023/12/23 13:11 upstream 5254c0cbc92d fb427a07 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __filemap_add_folio / invalidate_bdev
2023/12/21 03:22 upstream 1a44b0073b92 de21eb89 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __filemap_add_folio / invalidate_bdev
2023/12/02 04:08 upstream 815fb87b7530 f819d6f7 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __filemap_add_folio / invalidate_bdev
* Struck through repros no longer work on HEAD.