syzbot


KCSAN: data-race in __lru_add_drain_all / folio_activate (5)

Status: moderation: reported on 2024/04/24 22:06
Subsystems: mm
[Documentation on labels]
Reported-by: syzbot+a0daad591f6e1466327b@syzkaller.appspotmail.com
First crash: 9d08h, last: 9d08h
Similar bugs (4)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KCSAN: data-race in __lru_add_drain_all / folio_activate mm 2 550d 569d 0/26 auto-obsoleted due to no activity on 2022/12/05 13:00
upstream KCSAN: data-race in __lru_add_drain_all / folio_activate (3) mm 1 376d 376d 0/26 auto-obsoleted due to no activity on 2023/05/29 00:21
upstream KCSAN: data-race in __lru_add_drain_all / folio_activate (2) mm 2 446d 483d 0/26 auto-obsoleted due to no activity on 2023/04/01 02:31
upstream KCSAN: data-race in __lru_add_drain_all / folio_activate (4) mm 23 84d 147d 0/26 auto-obsoleted due to no activity on 2024/03/16 06:00

Sample crash report:
loop0: detected capacity change from 0 to 512
EXT4-fs (loop0): blocks per group (255) and clusters per group (4095) inconsistent
==================================================================
BUG: KCSAN: data-race in __lru_add_drain_all / folio_activate

read-write to 0xffff888237d2b008 of 1 bytes by task 63 on cpu 1:
 folio_batch_add include/linux/pagevec.h:77 [inline]
 folio_batch_add_and_move mm/swap.c:246 [inline]
 folio_activate+0xb7/0x1c0 mm/swap.c:376
 folio_mark_accessed+0x11d/0x190 mm/swap.c:496
 shmem_file_read_iter+0x2d1/0x550 mm/shmem.c:2861
 do_iter_readv_writev+0x339/0x3e0
 vfs_iter_read+0x172/0x3a0 fs/read_write.c:830
 lo_read_simple drivers/block/loop.c:286 [inline]
 do_req_filebacked drivers/block/loop.c:496 [inline]
 loop_handle_cmd drivers/block/loop.c:1907 [inline]
 loop_process_work+0x7bc/0x1110 drivers/block/loop.c:1942
 loop_rootcg_workfn+0x22/0x30 drivers/block/loop.c:1973
 process_one_work kernel/workqueue.c:3254 [inline]
 process_scheduled_works+0x465/0x990 kernel/workqueue.c:3335
 worker_thread+0x526/0x730 kernel/workqueue.c:3416
 kthread+0x1d1/0x210 kernel/kthread.c:388
 ret_from_fork+0x4b/0x60 arch/x86/kernel/process.c:147
 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244

read to 0xffff888237d2b008 of 1 bytes by task 6510 on cpu 0:
 folio_batch_count include/linux/pagevec.h:56 [inline]
 cpu_needs_drain mm/swap.c:815 [inline]
 __lru_add_drain_all+0x21d/0x420 mm/swap.c:904
 lru_add_drain_all+0x10/0x20 mm/swap.c:920
 invalidate_bdev+0x54/0x80 block/bdev.c:95
 __ext4_fill_super fs/ext4/super.c:5674 [inline]
 ext4_fill_super+0x1788/0x39d0 fs/ext4/super.c:5699
 get_tree_bdev+0x253/0x2e0 fs/super.c:1614
 ext4_get_tree+0x1c/0x30 fs/ext4/super.c:5731
 vfs_get_tree+0x56/0x1d0 fs/super.c:1779
 do_new_mount+0x227/0x690 fs/namespace.c:3352
 path_mount+0x49b/0xb30 fs/namespace.c:3679
 do_mount fs/namespace.c:3692 [inline]
 __do_sys_mount fs/namespace.c:3898 [inline]
 __se_sys_mount+0x27f/0x2d0 fs/namespace.c:3875
 __x64_sys_mount+0x67/0x80 fs/namespace.c:3875
 x64_sys_call+0x2591/0x2d30 arch/x86/include/generated/asm/syscalls_64.h:166
 do_syscall_x64 arch/x86/entry/common.c:52 [inline]
 do_syscall_64+0xcd/0x1d0 arch/x86/entry/common.c:83
 entry_SYSCALL_64_after_hwframe+0x77/0x7f

value changed: 0x00 -> 0x01

Reported by Kernel Concurrency Sanitizer on:
CPU: 0 PID: 6510 Comm: syz-executor.0 Not tainted 6.9.0-rc5-syzkaller-00042-ge88c4cfcb7b8 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/27/2024
==================================================================

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/04/24 22:05 upstream e88c4cfcb7b8 8bdc0f22 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __lru_add_drain_all / folio_activate
* Struck through repros no longer work on HEAD.