syzbot


KCSAN: data-race in delete_from_page_cache_batch / nr_blockdev_pages (12)

Status: moderation: reported on 2024/10/12 04:12
Subsystems: block
[Documentation on labels]
Reported-by: syzbot+88fd57beeb6a7d1489de@syzkaller.appspotmail.com
First crash: 3d20h, last: 3d20h
Similar bugs (11)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KCSAN: data-race in delete_from_page_cache_batch / nr_blockdev_pages (3) reiserfs 7 1350d 1408d 0/28 auto-closed as invalid on 2021/03/10 02:25
upstream KCSAN: data-race in delete_from_page_cache_batch / nr_blockdev_pages (9) block 5 312d 313d 0/28 auto-obsoleted due to no activity on 2024/01/12 00:31
upstream KCSAN: data-race in delete_from_page_cache_batch / nr_blockdev_pages (4) block 11 1030d 1069d 0/28 auto-closed as invalid on 2022/01/24 01:11
upstream KCSAN: data-race in delete_from_page_cache_batch / nr_blockdev_pages (5) block 1 982d 982d 0/28 auto-closed as invalid on 2022/03/13 10:24
upstream KCSAN: data-race in delete_from_page_cache_batch / nr_blockdev_pages fs 3 1503d 1545d 0/28 auto-closed as invalid on 2020/10/08 19:29
upstream KCSAN: data-race in delete_from_page_cache_batch / nr_blockdev_pages (8) ext4 block 4 423d 473d 0/28 auto-obsoleted due to no activity on 2023/09/23 21:11
upstream KCSAN: data-race in delete_from_page_cache_batch / nr_blockdev_pages (10) block 1 225d 225d 0/28 auto-obsoleted due to no activity on 2024/04/08 12:17
upstream KCSAN: data-race in delete_from_page_cache_batch / nr_blockdev_pages (7) fs mm 1 636d 636d 0/28 auto-obsoleted due to no activity on 2023/03/01 17:48
upstream KCSAN: data-race in delete_from_page_cache_batch / nr_blockdev_pages (2) fs 1 1453d 1453d 0/28 auto-closed as invalid on 2020/11/27 11:06
upstream KCSAN: data-race in delete_from_page_cache_batch / nr_blockdev_pages (6) block 1 938d 938d 0/28 auto-closed as invalid on 2022/04/26 01:47
upstream KCSAN: data-race in delete_from_page_cache_batch / nr_blockdev_pages (11) block 5 74d 143d 0/28 auto-obsoleted due to no activity on 2024/09/06 03:25

Sample crash report:
==================================================================
BUG: KCSAN: data-race in delete_from_page_cache_batch / nr_blockdev_pages

read-write to 0xffff8881004c1830 of 8 bytes by task 9169 on cpu 0:
 page_cache_delete_batch mm/filemap.c:325 [inline]
 delete_from_page_cache_batch+0x4f3/0x700 mm/filemap.c:344
 truncate_inode_pages_range+0x1c5/0x6b0 mm/truncate.c:343
 truncate_inode_pages+0x24/0x30 mm/truncate.c:423
 kill_bdev block/bdev.c:91 [inline]
 blkdev_flush_mapping+0xa5/0x1a0 block/bdev.c:671
 blkdev_put_whole block/bdev.c:678 [inline]
 bdev_release+0x2f9/0x420 block/bdev.c:1103
 blkdev_release+0x15/0x20 block/fops.c:639
 __fput+0x17a/0x6d0 fs/file_table.c:431
 __fput_sync+0x43/0x60 fs/file_table.c:516
 __do_sys_close fs/open.c:1565 [inline]
 __se_sys_close+0xf9/0x1a0 fs/open.c:1550
 __x64_sys_close+0x1f/0x30 fs/open.c:1550
 x64_sys_call+0x25cb/0x2d60 arch/x86/include/generated/asm/syscalls_64.h:4
 do_syscall_x64 arch/x86/entry/common.c:52 [inline]
 do_syscall_64+0xc9/0x1c0 arch/x86/entry/common.c:83
 entry_SYSCALL_64_after_hwframe+0x77/0x7f

read to 0xffff8881004c1830 of 8 bytes by task 3335 on cpu 1:
 nr_blockdev_pages+0x7c/0xd0 block/bdev.c:482
 si_meminfo+0x87/0xd0 mm/show_mem.c:80
 update_defense_level+0x49/0x5b0 net/netfilter/ipvs/ip_vs_ctl.c:102
 defense_work_handler+0x1f/0x80 net/netfilter/ipvs/ip_vs_ctl.c:235
 process_one_work kernel/workqueue.c:3229 [inline]
 process_scheduled_works+0x483/0x9a0 kernel/workqueue.c:3310
 worker_thread+0x51d/0x6f0 kernel/workqueue.c:3391
 kthread+0x1d1/0x210 kernel/kthread.c:389
 ret_from_fork+0x4b/0x60 arch/x86/kernel/process.c:147
 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244

value changed: 0x0000000000000009 -> 0x0000000000000000

Reported by Kernel Concurrency Sanitizer on:
CPU: 1 UID: 0 PID: 3335 Comm: kworker/1:2 Not tainted 6.12.0-rc2-syzkaller-00260-g9e4c6c1ad9a1 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/13/2024
Workqueue: events_long defense_work_handler
==================================================================

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/10/12 04:12 upstream 9e4c6c1ad9a1 084d8178 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in delete_from_page_cache_batch / nr_blockdev_pages
* Struck through repros no longer work on HEAD.