syzbot


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

Status: moderation: reported on 2024/05/25 00:37
Subsystems: block
[Documentation on labels]
Reported-by: syzbot+a342be28c76a8c322aa6@syzkaller.appspotmail.com
First crash: 21d, last: 21d
Similar bugs (10)
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 1228d 1285d 0/27 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 190d 190d 0/27 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 908d 946d 0/27 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 859d 859d 0/27 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 1380d 1422d 0/27 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 300d 350d 0/27 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 102d 102d 0/27 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 513d 513d 0/27 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 1330d 1330d 0/27 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 816d 816d 0/27 auto-closed as invalid on 2022/04/26 01:47

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

read-write to 0xffff8881004c0bb8 of 8 bytes by task 22451 on cpu 0:
 page_cache_delete_batch mm/filemap.c:324 [inline]
 delete_from_page_cache_batch+0x4f4/0x710 mm/filemap.c:343
 truncate_inode_pages_range+0x1c5/0x6b0 mm/truncate.c:359
 truncate_inode_pages+0x24/0x30 mm/truncate.c:439
 kill_bdev block/bdev.c:90 [inline]
 blkdev_flush_mapping+0xa5/0x1a0 block/bdev.c:664
 blkdev_put_whole block/bdev.c:671 [inline]
 bdev_release+0x305/0x430 block/bdev.c:1096
 blkdev_release+0x15/0x20 block/fops.c:623
 __fput+0x2c2/0x660 fs/file_table.c:422
 ____fput+0x15/0x20 fs/file_table.c:450
 task_work_run+0x13a/0x1a0 kernel/task_work.c:180
 exit_task_work include/linux/task_work.h:38 [inline]
 do_exit+0x5d5/0x1710 kernel/exit.c:874
 do_group_exit+0x142/0x150 kernel/exit.c:1023
 __do_sys_exit_group kernel/exit.c:1034 [inline]
 __se_sys_exit_group kernel/exit.c:1032 [inline]
 __x64_sys_exit_group+0x1f/0x20 kernel/exit.c:1032
 x64_sys_call+0x27c1/0x2d30 arch/x86/include/generated/asm/syscalls_64.h:232
 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 0xffff8881004c0bb8 of 8 bytes by task 4694 on cpu 1:
 nr_blockdev_pages+0x7c/0xd0 block/bdev.c:475
 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:3231 [inline]
 process_scheduled_works+0x483/0x9a0 kernel/workqueue.c:3312
 worker_thread+0x526/0x730 kernel/workqueue.c:3393
 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: 0x0000000000000001 -> 0x0000000000000000

Reported by Kernel Concurrency Sanitizer on:
CPU: 1 PID: 4694 Comm: kworker/1:11 Not tainted 6.9.0-syzkaller-12220-g02c438bbfffe #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 04/02/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/05/25 00:37 upstream 02c438bbfffe a10a183e .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.