syzbot


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

Status: auto-closed as invalid on 2022/03/19 14:36
Reported-by: syzbot+@syzkaller.appspotmail.com
First crash: 298d, last: 298d
similar bugs (3):
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KCSAN: data-race in __lru_add_drain_all / pagevec_lru_move_fn (4) 3 151d 203d 0/24 auto-closed as invalid on 2022/08/13 14:33
upstream KCSAN: data-race in __lru_add_drain_all / pagevec_lru_move_fn (2) 2 382d 390d 0/24 auto-closed as invalid on 2021/12/25 22:36
upstream KCSAN: data-race in __lru_add_drain_all / pagevec_lru_move_fn 1 495d 495d 0/24 auto-closed as invalid on 2021/09/03 07:09

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

write to 0xffff888237c27a18 of 1 bytes by task 1819 on cpu 0:
 pagevec_reinit include/linux/pagevec.h:57 [inline]
 pagevec_lru_move_fn+0x317/0x340 mm/swap.c:216
 lru_add_drain_cpu+0x155/0x260 mm/swap.c:628
 lru_add_drain mm/swap.c:717 [inline]
 __pagevec_release+0x4b/0xc0 mm/swap.c:997
 pagevec_release include/linux/pagevec.h:82 [inline]
 folio_batch_release include/linux/pagevec.h:146 [inline]
 __invalidate_mapping_pages+0x21f/0x2b0 mm/truncate.c:541
 invalidate_mapping_pages+0x23/0x30 mm/truncate.c:565
 invalidate_bdev+0x67/0x80 block/bdev.c:88
 ext4_put_super+0x408/0x610 fs/ext4/super.c:1271
 generic_shutdown_super+0xdf/0x250 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:1143
 __cleanup_mnt+0x15/0x20 fs/namespace.c:1150
 task_work_run+0x8e/0x110 kernel/task_work.c:164
 tracehook_notify_resume include/linux/tracehook.h:188 [inline]
 exit_to_user_mode_loop kernel/entry/common.c:175 [inline]
 exit_to_user_mode_prepare+0x160/0x190 kernel/entry/common.c:207
 __syscall_exit_to_user_mode_work kernel/entry/common.c:289 [inline]
 syscall_exit_to_user_mode+0x20/0x40 kernel/entry/common.c:300
 do_syscall_64+0x50/0xd0 arch/x86/entry/common.c:86
 entry_SYSCALL_64_after_hwframe+0x44/0xae

read to 0xffff888237c27a18 of 1 bytes by task 1830 on cpu 1:
 pagevec_count include/linux/pagevec.h:62 [inline]
 __lru_add_drain_all+0x1a3/0x3e0 mm/swap.c:837
 lru_add_drain_all+0xc/0x10 mm/swap.c:857
 invalidate_bdev+0x56/0x80 block/bdev.c:87
 ext4_put_super+0x408/0x610 fs/ext4/super.c:1271
 generic_shutdown_super+0xdf/0x250 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:1143
 __cleanup_mnt+0x15/0x20 fs/namespace.c:1150
 task_work_run+0x8e/0x110 kernel/task_work.c:164
 tracehook_notify_resume include/linux/tracehook.h:188 [inline]
 exit_to_user_mode_loop kernel/entry/common.c:175 [inline]
 exit_to_user_mode_prepare+0x160/0x190 kernel/entry/common.c:207
 __syscall_exit_to_user_mode_work kernel/entry/common.c:289 [inline]
 syscall_exit_to_user_mode+0x20/0x40 kernel/entry/common.c:300
 do_syscall_64+0x50/0xd0 arch/x86/entry/common.c:86
 entry_SYSCALL_64_after_hwframe+0x44/0xae

value changed: 0x01 -> 0x00

Reported by Kernel Concurrency Sanitizer on:
CPU: 1 PID: 1830 Comm: syz-executor.5 Not tainted 5.17.0-rc3-syzkaller-00247-g83e396641110-dirty #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
==================================================================

Crashes (1):
Manager Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Title
ci2-upstream-kcsan-gce 2022/02/12 14:33 upstream 83e396641110 8b9ca619 .config log report info KCSAN: data-race in __lru_add_drain_all / pagevec_lru_move_fn
* Struck through repros no longer work on HEAD.