syzbot


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

Status: auto-obsoleted due to no activity on 2024/06/06 20:44
Subsystems: mm
[Documentation on labels]
Reported-by: syzbot+25946262c3a67c5c25ee@syzkaller.appspotmail.com
First crash: 85d, last: 85d
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 mm 1 746d 746d 0/27 auto-closed as invalid on 2022/08/15 13:18
upstream KCSAN: data-race in __lru_add_drain_all / deactivate_file_folio (2) mm 1 495d 495d 0/27 auto-obsoleted due to no activity on 2023/05/01 12:19

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

read-write to 0xffff888237d2ad08 of 1 bytes by task 3793 on cpu 1:
 folio_batch_add include/linux/pagevec.h:77 [inline]
 folio_batch_add_and_move mm/swap.c:246 [inline]
 deactivate_file_folio+0x66/0x160 mm/swap.c:716
 mapping_try_invalidate+0x2be/0x3e0 mm/truncate.c:518
 invalidate_mapping_pages+0x27/0x40 mm/truncate.c:549
 invalidate_bdev+0x65/0x80 block/bdev.c:96
 ext4_put_super+0x51b/0x7e0 fs/ext4/super.c:1361
 generic_shutdown_super+0xde/0x210 fs/super.c:641
 kill_block_super+0x2a/0x70 fs/super.c:1675
 ext4_kill_sb+0x44/0x80 fs/ext4/super.c:7327
 deactivate_locked_super+0x7d/0x1c0 fs/super.c:472
 deactivate_super+0x9f/0xb0 fs/super.c:505
 cleanup_mnt+0x272/0x2e0 fs/namespace.c:1267
 __cleanup_mnt+0x19/0x20 fs/namespace.c:1274
 task_work_run+0x13a/0x1a0 kernel/task_work.c:180
 resume_user_mode_work include/linux/resume_user_mode.h:50 [inline]
 exit_to_user_mode_loop kernel/entry/common.c:114 [inline]
 exit_to_user_mode_prepare include/linux/entry-common.h:328 [inline]
 __syscall_exit_to_user_mode_work kernel/entry/common.c:207 [inline]
 syscall_exit_to_user_mode+0xbe/0x130 kernel/entry/common.c:218
 do_syscall_64+0xda/0x1d0 arch/x86/entry/common.c:89
 entry_SYSCALL_64_after_hwframe+0x77/0x7f

read to 0xffff888237d2ad08 of 1 bytes by task 3776 on cpu 0:
 folio_batch_count include/linux/pagevec.h:56 [inline]
 cpu_needs_drain mm/swap.c:812 [inline]
 __lru_add_drain_all+0x1a2/0x420 mm/swap.c:904
 lru_add_drain_all+0x10/0x20 mm/swap.c:920
 invalidate_bdev+0x54/0x80 block/bdev.c:95
 ext4_put_super+0x51b/0x7e0 fs/ext4/super.c:1361
 generic_shutdown_super+0xde/0x210 fs/super.c:641
 kill_block_super+0x2a/0x70 fs/super.c:1675
 ext4_kill_sb+0x44/0x80 fs/ext4/super.c:7327
 deactivate_locked_super+0x7d/0x1c0 fs/super.c:472
 deactivate_super+0x9f/0xb0 fs/super.c:505
 cleanup_mnt+0x272/0x2e0 fs/namespace.c:1267
 __cleanup_mnt+0x19/0x20 fs/namespace.c:1274
 task_work_run+0x13a/0x1a0 kernel/task_work.c:180
 resume_user_mode_work include/linux/resume_user_mode.h:50 [inline]
 exit_to_user_mode_loop kernel/entry/common.c:114 [inline]
 exit_to_user_mode_prepare include/linux/entry-common.h:328 [inline]
 __syscall_exit_to_user_mode_work kernel/entry/common.c:207 [inline]
 syscall_exit_to_user_mode+0xbe/0x130 kernel/entry/common.c:218
 do_syscall_64+0xda/0x1d0 arch/x86/entry/common.c:89
 entry_SYSCALL_64_after_hwframe+0x77/0x7f

value changed: 0x01 -> 0x02

Reported by Kernel Concurrency Sanitizer on:
CPU: 0 PID: 3776 Comm: syz-executor.4 Not tainted 6.9.0-rc6-syzkaller-00113-g49a73b1652c5 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/27/2024
==================================================================
EXT4-fs (loop4): unmounting filesystem 00000000-0000-0000-0000-000000000000.

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/05/02 20:43 upstream 49a73b1652c5 ddfc15a1 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __lru_add_drain_all / deactivate_file_folio
* Struck through repros no longer work on HEAD.