syzbot


KCSAN: data-race in __filemap_add_folio / nr_blockdev_pages (3)

Status: moderation: reported on 2023/12/10 00:02
Subsystems: ext4 mm
[Documentation on labels]
Reported-by: syzbot+a0bf2421e1edfc040964@syzkaller.appspotmail.com
First crash: 154d, last: 4d00h
Similar bugs (2)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KCSAN: data-race in __filemap_add_folio / nr_blockdev_pages ext4 45 736d 842d 0/26 auto-closed as invalid on 2022/04/01 15:15
upstream KCSAN: data-race in __filemap_add_folio / nr_blockdev_pages (2) ext4 63 190d 696d 0/26 auto-obsoleted due to no activity on 2023/09/28 20:31

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

read-write to 0xffff8881006311f0 of 8 bytes by task 1673 on cpu 1:
 __filemap_add_folio+0x4c1/0x730 mm/filemap.c:903
 filemap_add_folio+0x70/0x160 mm/filemap.c:938
 __filemap_get_folio+0x2f1/0x5a0 mm/filemap.c:1927
 grow_dev_folio fs/buffer.c:1042 [inline]
 grow_buffers fs/buffer.c:1108 [inline]
 __getblk_slow fs/buffer.c:1134 [inline]
 bdev_getblk+0x1a5/0x430 fs/buffer.c:1429
 ext4_sb_breadahead_unmovable+0x44/0x190 fs/ext4/super.c:264
 ext4_group_desc_init+0x5a1/0x1400 fs/ext4/super.c:4872
 __ext4_fill_super fs/ext4/super.c:5305 [inline]
 ext4_fill_super+0x23c6/0x39b0 fs/ext4/super.c:5703
 get_tree_bdev+0x250/0x2e0 fs/super.c:1614
 ext4_get_tree+0x1c/0x20 fs/ext4/super.c:5735
 vfs_get_tree+0x53/0x1d0 fs/super.c:1779
 do_new_mount+0x227/0x690 fs/namespace.c:3352
 path_mount+0x496/0xb30 fs/namespace.c:3679
 do_mount fs/namespace.c:3692 [inline]
 __do_sys_mount fs/namespace.c:3898 [inline]
 __se_sys_mount+0x27f/0x2d0 fs/namespace.c:3875
 __x64_sys_mount+0x67/0x80 fs/namespace.c:3875
 do_syscall_x64 arch/x86/entry/common.c:52 [inline]
 do_syscall_64+0xcd/0x1d0 arch/x86/entry/common.c:83
 entry_SYSCALL_64_after_hwframe+0x63/0x6b

read to 0xffff8881006311f0 of 8 bytes by task 28772 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: 0x0000000000000001 -> 0x0000000000000002

Reported by Kernel Concurrency Sanitizer on:
CPU: 0 PID: 28772 Comm: kworker/0:11 Not tainted 6.8.0-rc6-syzkaller-00011-g45ec2f5f6ed3 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/25/2024
Workqueue: events_long defense_work_handler
==================================================================

Crashes (18):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/02/27 16:06 upstream 45ec2f5f6ed3 05e69c83 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __filemap_add_folio / nr_blockdev_pages
2024/02/22 04:12 upstream 39133352cbed 345111b5 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __filemap_add_folio / nr_blockdev_pages
2024/02/13 08:08 upstream c664e16bb1ba 77b23aa1 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __filemap_add_folio / nr_blockdev_pages
2024/02/12 14:06 upstream 841c35169323 77b23aa1 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __filemap_add_folio / nr_blockdev_pages
2024/02/09 01:18 upstream 047371968ffc 7f07e9b0 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __filemap_add_folio / nr_blockdev_pages
2024/01/09 18:21 upstream 9f8413c4a66f 4807fb37 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __filemap_add_folio / nr_blockdev_pages
2024/01/05 02:50 upstream 5eff55d725a4 28c42cff .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __filemap_add_folio / nr_blockdev_pages
2023/12/21 12:24 upstream a4aebe936554 4f9530a3 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __filemap_add_folio / nr_blockdev_pages
2023/12/12 02:55 upstream 26aff849438c 28b24332 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __filemap_add_folio / nr_blockdev_pages
2023/11/24 18:38 upstream f1a09972a45a 5b429f39 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __filemap_add_folio / nr_blockdev_pages
2023/11/17 08:12 upstream 7475e51b8796 cb976f63 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __filemap_add_folio / nr_blockdev_pages
2023/11/15 13:09 upstream c42d9eeef8e5 cb976f63 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __filemap_add_folio / nr_blockdev_pages
2023/11/01 17:19 upstream 8bc9e6515183 69904c9f .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __filemap_add_folio / nr_blockdev_pages
2023/10/20 20:28 upstream c8045b4a33a5 361b23dc .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __filemap_add_folio / nr_blockdev_pages
2023/10/14 05:26 upstream 8cb1f10d8c4b f757a323 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __filemap_add_folio / nr_blockdev_pages
2023/10/02 01:28 upstream e81a2dabc3f3 8e26a358 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __filemap_add_folio / nr_blockdev_pages
2023/10/01 12:24 upstream e402b08634b3 8e26a358 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __filemap_add_folio / nr_blockdev_pages
2023/09/30 06:43 upstream 9f3ebbef746f 8e26a358 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __filemap_add_folio / nr_blockdev_pages
* Struck through repros no longer work on HEAD.