syzbot


KCSAN: data-race in __lru_add_drain_all / deactivate_file_folio (2)

Status: auto-obsoleted due to no activity on 2023/05/01 12:19
Subsystems: mm
[Documentation on labels]
First crash: 537d, last: 537d
Similar bugs (2)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KCSAN: data-race in __lru_add_drain_all / deactivate_file_folio (3) mm 1 128d 128d 0/27 auto-obsoleted due to no activity on 2024/06/06 20:44
upstream KCSAN: data-race in __lru_add_drain_all / deactivate_file_folio mm 1 789d 789d 0/27 auto-closed as invalid on 2022/08/15 13:18

Sample crash report:
EXT4-fs (loop2): get root inode failed
EXT4-fs (loop2): mount failed
==================================================================
BUG: KCSAN: data-race in __lru_add_drain_all / deactivate_file_folio

read-write to 0xffff888237c29948 of 1 bytes by task 3180 on cpu 0:
 folio_batch_add include/linux/pagevec.h:126 [inline]
 folio_batch_add_and_move mm/swap.c:231 [inline]
 deactivate_file_folio+0x86/0x170 mm/swap.c:701
 invalidate_mapping_pagevec+0x2df/0x3f0 mm/truncate.c:528
 invalidate_mapping_pages+0x27/0x30 mm/truncate.c:559
 invalidate_bdev+0x6b/0x80 block/bdev.c:87
 ext4_put_super+0x4f8/0x7f0 fs/ext4/super.c:1273
 generic_shutdown_super+0xd9/0x260 fs/super.c:491
 kill_block_super+0x4e/0xa0 fs/super.c:1398
 deactivate_locked_super+0x6b/0xd0 fs/super.c:331
 deactivate_super+0x9b/0xb0 fs/super.c:362
 cleanup_mnt+0x272/0x2e0 fs/namespace.c:1177
 __cleanup_mnt+0x19/0x20 fs/namespace.c:1184
 task_work_run+0x123/0x160 kernel/task_work.c:179
 resume_user_mode_work include/linux/resume_user_mode.h:49 [inline]
 exit_to_user_mode_loop+0xcf/0xe0 kernel/entry/common.c:171
 exit_to_user_mode_prepare+0x6a/0xa0 kernel/entry/common.c:203
 __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+0x4d/0xc0 arch/x86/entry/common.c:86
 entry_SYSCALL_64_after_hwframe+0x63/0xcd

read to 0xffff888237c29948 of 1 bytes by task 8582 on cpu 1:
 folio_batch_count include/linux/pagevec.h:105 [inline]
 cpu_needs_drain mm/swap.c:797 [inline]
 __lru_add_drain_all+0x1a2/0x420 mm/swap.c:889
 lru_add_drain_all+0x10/0x20 mm/swap.c:905
 invalidate_bdev+0x5a/0x80 block/bdev.c:86
 invalidate_disk+0x29/0xc0 block/genhd.c:712
 __loop_clr_fd+0x163/0x3b0 drivers/block/loop.c:1164
 loop_clr_fd drivers/block/loop.c:1257 [inline]
 lo_ioctl+0xe9e/0x12f0 drivers/block/loop.c:1563
 blkdev_ioctl+0x3a0/0x490 block/ioctl.c:615
 vfs_ioctl fs/ioctl.c:51 [inline]
 __do_sys_ioctl fs/ioctl.c:870 [inline]
 __se_sys_ioctl+0xc9/0x140 fs/ioctl.c:856
 __x64_sys_ioctl+0x43/0x50 fs/ioctl.c:856
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x41/0xc0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x63/0xcd

value changed: 0x00 -> 0x01

Reported by Kernel Concurrency Sanitizer on:
CPU: 1 PID: 8582 Comm: syz-executor.2 Not tainted 6.3.0-rc3-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/02/2023
==================================================================

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2023/03/20 11:45 upstream e8d018dd0257 7939252e .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in __lru_add_drain_all / deactivate_file_folio
* Struck through repros no longer work on HEAD.