syzbot


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

Status: auto-obsoleted due to no activity on 2024/04/08 12:17
Subsystems: block
[Documentation on labels]
Reported-by: syzbot+905741ed580a4d9ed64c@syzkaller.appspotmail.com
First crash: 49d, last: 49d
Similar bugs (9)
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 1175d 1232d 0/26 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 137d 137d 0/26 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 855d 893d 0/26 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 806d 806d 0/26 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 1327d 1369d 0/26 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 247d 297d 0/26 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 (7) fs mm 1 460d 460d 0/26 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 1277d 1277d 0/26 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 763d 763d 0/26 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 0xffff8881006311f0 of 8 bytes by task 3095 on cpu 1:
 page_cache_delete_batch mm/filemap.c:315 [inline]
 delete_from_page_cache_batch+0x515/0x710 mm/filemap.c:334
 truncate_inode_pages_range+0x1bd/0x6a0 mm/truncate.c:359
 truncate_inode_pages+0x24/0x30 mm/truncate.c:439
 kill_bdev block/bdev.c:79 [inline]
 blkdev_flush_mapping+0xc2/0x1c0 block/bdev.c:638
 blkdev_put_whole block/bdev.c:669 [inline]
 bdev_release+0x3f6/0x540 block/bdev.c:985
 kill_block_super+0x54/0x60 fs/super.c:1678
 deactivate_locked_super+0x7a/0x1c0 fs/super.c:472
 deactivate_super+0x9b/0xb0 fs/super.c:505
 cleanup_mnt+0x272/0x2e0 fs/namespace.c:1267
 __cleanup_mnt+0x19/0x20 fs/namespace.c:1274
 task_work_run+0x135/0x1a0 kernel/task_work.c:180
 resume_user_mode_work include/linux/resume_user_mode.h:50 [inline]
 exit_to_user_mode_loop kernel/entry/common.c:108 [inline]
 exit_to_user_mode_prepare include/linux/entry-common.h:328 [inline]
 __syscall_exit_to_user_mode_work kernel/entry/common.c:201 [inline]
 syscall_exit_to_user_mode+0xbd/0x120 kernel/entry/common.c:212
 do_syscall_64+0xda/0x1d0 arch/x86/entry/common.c:89
 entry_SYSCALL_64_after_hwframe+0x63/0x6b

read to 0xffff8881006311f0 of 8 bytes by task 904 on cpu 0:
 nr_blockdev_pages+0x7c/0xd0 block/bdev.c:449
 si_meminfo+0x87/0xd0 mm/show_mem.c:80
 update_defense_level+0x46/0x600 net/netfilter/ipvs/ip_vs_ctl.c:101
 defense_work_handler+0x1f/0x80 net/netfilter/ipvs/ip_vs_ctl.c:235
 process_one_work kernel/workqueue.c:2633 [inline]
 process_scheduled_works+0x5b8/0xa40 kernel/workqueue.c:2706
 worker_thread+0x525/0x730 kernel/workqueue.c:2787
 kthread+0x1d7/0x210 kernel/kthread.c:388
 ret_from_fork+0x48/0x60 arch/x86/kernel/process.c:147
 ret_from_fork_asm+0x11/0x20 arch/x86/entry/entry_64.S:243

value changed: 0x0000000000000027 -> 0x0000000000000018

Reported by Kernel Concurrency Sanitizer on:
CPU: 0 PID: 904 Comm: kworker/0:2 Not tainted 6.8.0-rc7-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/25/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/03/04 12:16 upstream 90d35da658da 3717835d .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.