syzbot


KCSAN: data-race in __filemap_remove_folio / nr_blockdev_pages (5)

Status: moderation: reported on 2024/07/03 09:13
Subsystems: mm
[Documentation on labels]
Reported-by: syzbot+153fd6da483deb37bc3e@syzkaller.appspotmail.com
First crash: 140d, last: 11d
Similar bugs (4)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KCSAN: data-race in __filemap_remove_folio / nr_blockdev_pages (4) mm 5 190d 222d 0/28 auto-obsoleted due to no activity on 2024/06/18 09:41
upstream KCSAN: data-race in __filemap_remove_folio / nr_blockdev_pages (3) mm 26 266d 348d 0/28 auto-obsoleted due to no activity on 2024/04/03 15:08
upstream KCSAN: data-race in __filemap_remove_folio / nr_blockdev_pages (2) mm 6 581d 701d 0/28 auto-obsoleted due to no activity on 2023/05/25 03:03
upstream KCSAN: data-race in __filemap_remove_folio / nr_blockdev_pages block 4 995d 1041d 0/28 auto-closed as invalid on 2022/04/05 12:28

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

read-write to 0xffff888100631830 of 8 bytes by task 3318 on cpu 1:
 page_cache_delete mm/filemap.c:155 [inline]
 __filemap_remove_folio+0x1c5/0x2c0 mm/filemap.c:233
 __remove_mapping+0x33f/0x470 mm/vmscan.c:791
 remove_mapping+0x22/0x90 mm/vmscan.c:824
 mapping_evict_folio mm/truncate.c:277 [inline]
 mapping_try_invalidate+0x266/0x3f0 mm/truncate.c:496
 invalidate_mapping_pages+0x27/0x40 mm/truncate.c:538
 invalidate_bdev+0x58/0x70 block/bdev.c:102
 ext4_put_super+0x571/0x840 fs/ext4/super.c:1349
 generic_shutdown_super+0xe5/0x220 fs/super.c:642
 kill_block_super+0x2a/0x70 fs/super.c:1710
 ext4_kill_sb+0x44/0x80 fs/ext4/super.c:7320
 deactivate_locked_super+0x7d/0x1c0 fs/super.c:473
 deactivate_super+0x9f/0xb0 fs/super.c:506
 cleanup_mnt+0x268/0x2e0 fs/namespace.c:1373
 __cleanup_mnt+0x19/0x20 fs/namespace.c:1380
 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 0xffff888100631830 of 8 bytes by task 3558 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: 0x0000000000000004 -> 0x0000000000000002

Reported by Kernel Concurrency Sanitizer on:
CPU: 0 UID: 0 PID: 3558 Comm: kworker/0:5 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 (23):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/11/09 12:28 upstream da4373fbcf00 6b856513 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __filemap_remove_folio / nr_blockdev_pages
2024/11/09 04:04 upstream f1dce1f09380 6b856513 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __filemap_remove_folio / nr_blockdev_pages
2024/10/25 17:33 upstream ae90f6a6170d 045e728d .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __filemap_remove_folio / nr_blockdev_pages
2024/10/23 05:37 upstream c2ee9f594da8 15fa2979 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __filemap_remove_folio / nr_blockdev_pages
2024/10/21 23:38 upstream d12937763990 f1e4447c .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __filemap_remove_folio / nr_blockdev_pages
2024/10/16 15:25 upstream 2f87d0916ce0 bde2d81c .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __filemap_remove_folio / nr_blockdev_pages
2024/10/12 09:52 upstream 9e4c6c1ad9a1 084d8178 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __filemap_remove_folio / nr_blockdev_pages
2024/10/09 07:06 upstream 5b7c893ed5ed 402f1df0 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __filemap_remove_folio / nr_blockdev_pages
2024/10/02 23:30 upstream f23aa4c0761a 02f9582a .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __filemap_remove_folio / nr_blockdev_pages
2024/09/29 19:40 upstream e7ed34365879 ba29ff75 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __filemap_remove_folio / nr_blockdev_pages
2024/09/25 04:07 upstream 684a64bf32b6 5643e0e9 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __filemap_remove_folio / nr_blockdev_pages
2024/09/17 19:47 upstream 2f27fce67173 c673ca06 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __filemap_remove_folio / nr_blockdev_pages
2024/08/27 07:41 upstream 3e9bff3bbe13 9aee4e0b .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __filemap_remove_folio / nr_blockdev_pages
2024/08/24 03:43 upstream 60f0560f53e3 d7d32352 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __filemap_remove_folio / nr_blockdev_pages
2024/07/24 17:29 upstream 786c8248dbd3 d1a1b0ca .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __filemap_remove_folio / nr_blockdev_pages
2024/07/23 23:33 upstream 28bbe4ea686a e50e8da5 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __filemap_remove_folio / nr_blockdev_pages
2024/07/22 17:04 upstream 933069701c1b df655b64 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __filemap_remove_folio / nr_blockdev_pages
2024/07/20 01:22 upstream 4305ca0087dd 890ce4f3 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __filemap_remove_folio / nr_blockdev_pages
2024/07/16 20:42 upstream d67978318827 b66b37bd .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __filemap_remove_folio / nr_blockdev_pages
2024/07/10 09:13 upstream 34afb82a3c67 bc144f9a .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __filemap_remove_folio / nr_blockdev_pages
2024/07/09 00:16 upstream 4376e966ecb7 cde64f7d .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __filemap_remove_folio / nr_blockdev_pages
2024/07/08 13:47 upstream 256abd8e550c cde64f7d .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __filemap_remove_folio / nr_blockdev_pages
2024/07/03 09:12 upstream e9d22f7a6655 1ecfa2d8 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __filemap_remove_folio / nr_blockdev_pages
* Struck through repros no longer work on HEAD.