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: 40d, last: 11d
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 1387d 1444d 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 349d 349d 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 1067d 1105d 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 1018d 1018d 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 1539d 1581d 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 459d 509d 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 261d 261d 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 672d 672d 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 1489d 1489d 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 975d 975d 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 111d 180d 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 0xffff8881006311f0 of 8 bytes by task 3315 on cpu 1:
 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+0x1c/0x30 fs/file_table.c:459
 task_work_run+0x13a/0x1a0 kernel/task_work.c:239
 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+0xd6/0x1c0 arch/x86/entry/common.c:89
 entry_SYSCALL_64_after_hwframe+0x77/0x7f

read to 0xffff8881006311f0 of 8 bytes by task 2980 on cpu 0:
 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: 0x0000000000000001 -> 0x0000000000000000

Reported by Kernel Concurrency Sanitizer on:
CPU: 0 UID: 0 PID: 2980 Comm: kworker/0:2 Not tainted 6.12.0-rc6-syzkaller-00272-gda4373fbcf00 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/13/2024
Workqueue: events_long defense_work_handler
==================================================================

Crashes (2):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/11/09 12:25 upstream da4373fbcf00 6b856513 .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
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.