syzbot


KCSAN: data-race in __lru_add_drain_all / pagevec_lru_move_fn

Status: auto-closed as invalid on 2021/09/03 07:09
Subsystems: mm
[Documentation on labels]
First crash: 944d, last: 944d
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 (3) mm 1 747d 747d 0/26 auto-closed as invalid on 2022/03/19 14:36
upstream KCSAN: data-race in __lru_add_drain_all / pagevec_lru_move_fn (4) mm 3 600d 652d 0/26 auto-closed as invalid on 2022/08/13 14:33
upstream KCSAN: data-race in __lru_add_drain_all / pagevec_lru_move_fn (2) mm 2 831d 839d 0/26 auto-closed as invalid on 2021/12/25 22:36

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

write to 0xffff888237d42728 of 1 bytes by task 29835 on cpu 1:
 pagevec_reinit include/linux/pagevec.h:56 [inline]
 pagevec_lru_move_fn+0x2a7/0x2d0 mm/swap.c:226
 activate_page_drain mm/swap.c:342 [inline]
 lru_add_drain_cpu+0x234/0x270 mm/swap.c:644
 lru_add_drain mm/swap.c:724 [inline]
 __pagevec_release+0x57/0xa0 mm/swap.c:989
 pagevec_release include/linux/pagevec.h:81 [inline]
 shmem_undo_range+0x32f/0xe20 mm/shmem.c:931
 shmem_truncate_range mm/shmem.c:1030 [inline]
 shmem_evict_inode+0x115/0x5a0 mm/shmem.c:1132
 evict+0x1c8/0x3c0 fs/inode.c:584
 iput_final fs/inode.c:1660 [inline]
 iput+0x430/0x580 fs/inode.c:1686
 dentry_unlink_inode+0x23a/0x260 fs/dcache.c:376
 __dentry_kill+0x2af/0x4e0 fs/dcache.c:582
 dentry_kill fs/dcache.c:695 [inline]
 dput+0xc6/0x360 fs/dcache.c:888
 __fput+0x3ab/0x4e0 fs/file_table.c:293
 ____fput+0x11/0x20 fs/file_table.c:313
 task_work_run+0xae/0x130 kernel/task_work.c:164
 tracehook_notify_resume include/linux/tracehook.h:189 [inline]
 exit_to_user_mode_loop kernel/entry/common.c:175 [inline]
 exit_to_user_mode_prepare+0x156/0x190 kernel/entry/common.c:209
 __syscall_exit_to_user_mode_work kernel/entry/common.c:291 [inline]
 syscall_exit_to_user_mode+0x20/0x40 kernel/entry/common.c:302
 do_syscall_64+0x49/0x90 arch/x86/entry/common.c:86
 entry_SYSCALL_64_after_hwframe+0x44/0xae

read to 0xffff888237d42728 of 1 bytes by task 29815 on cpu 0:
 pagevec_count include/linux/pagevec.h:61 [inline]
 need_activate_page_drain mm/swap.c:347 [inline]
 __lru_add_drain_all+0x236/0x3e0 mm/swap.c:833
 lru_add_drain_all+0xc/0x10 mm/swap.c:850
 invalidate_bdev+0x50/0x70 fs/block_dev.c:96
 bdev_disk_changed+0xf3/0xea0 block/partitions/core.c:677
 loop_reread_partitions drivers/block/loop.c:652 [inline]
 loop_set_status+0x4dc/0x5a0 drivers/block/loop.c:1510
 lo_ioctl+0x764/0x1210 drivers/block/loop.c:1620
 blkdev_ioctl+0x1d0/0x3c0 block/ioctl.c:585
 block_ioctl+0x6d/0x80 fs/block_dev.c:1602
 vfs_ioctl fs/ioctl.c:51 [inline]
 __do_sys_ioctl fs/ioctl.c:1069 [inline]
 __se_sys_ioctl+0xcb/0x140 fs/ioctl.c:1055
 __x64_sys_ioctl+0x3f/0x50 fs/ioctl.c:1055
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x3d/0x90 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x44/0xae

value changed: 0x01 -> 0x00

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

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2021/07/30 07:08 upstream 764a5bc89b12 c585c7b0 .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in __lru_add_drain_all / pagevec_lru_move_fn
* Struck through repros no longer work on HEAD.