syzbot


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

Status: moderation: reported on 2023/12/10 00:02
Subsystems: block
[Documentation on labels]
Reported-by: syzbot+a0bf2421e1edfc040964@syzkaller.appspotmail.com
First crash: 291d, last: 2d01h
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 873d 979d 0/27 auto-closed as invalid on 2022/04/01 15:15
upstream KCSAN: data-race in __filemap_add_folio / nr_blockdev_pages (2) ext4 63 327d 833d 0/27 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 0xffff888100630bb8 of 8 bytes by task 16694 on cpu 1:
 __filemap_add_folio+0x439/0x710 mm/filemap.c:918
 filemap_add_folio+0x9c/0x1b0 mm/filemap.c:970
 __filemap_get_folio+0x2f1/0x5b0 mm/filemap.c:1958
 grow_dev_folio fs/buffer.c:1049 [inline]
 grow_buffers fs/buffer.c:1115 [inline]
 __getblk_slow fs/buffer.c:1141 [inline]
 bdev_getblk+0x198/0x400 fs/buffer.c:1443
 ext4_sb_breadahead_unmovable+0x44/0x190 fs/ext4/super.c:264
 __ext4_get_inode_loc+0x6d4/0x910 fs/ext4/inode.c:4445
 __ext4_get_inode_loc_noinmem fs/ext4/inode.c:4475 [inline]
 __ext4_iget+0x311/0x1e80 fs/ext4/inode.c:4697
 __ext4_fill_super fs/ext4/super.c:5447 [inline]
 ext4_fill_super+0x2fba/0x39e0 fs/ext4/super.c:5676
 get_tree_bdev+0x253/0x2e0 fs/super.c:1624
 ext4_get_tree+0x1c/0x30 fs/ext4/super.c:5708
 vfs_get_tree+0x56/0x1d0 fs/super.c:1789
 do_new_mount+0x227/0x690 fs/namespace.c:3352
 path_mount+0x49b/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
 x64_sys_call+0x25c9/0x2d70 arch/x86/include/generated/asm/syscalls_64.h:166
 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 0xffff888100630bb8 of 8 bytes by task 9 on cpu 0:
 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:3248 [inline]
 process_scheduled_works+0x483/0x9a0 kernel/workqueue.c:3329
 worker_thread+0x526/0x720 kernel/workqueue.c:3409
 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: 0x0000000000000003 -> 0x0000000000000004

Reported by Kernel Concurrency Sanitizer on:
CPU: 0 PID: 9 Comm: kworker/0:1 Tainted: G        W          6.10.0-syzkaller-00017-g5e0497553643 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 06/07/2024
Workqueue: events_long defense_work_handler
==================================================================

Crashes (44):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/07/15 18:10 upstream 5e0497553643 c605e6a2 .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/07/11 10:02 upstream 9d9a2f29aefd c699c2eb .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/07/06 02:51 upstream d270dd21bee0 2a40360c .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/07/02 13:26 upstream 1dfe225e9af5 07f0a0a0 .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/06/23 02:34 upstream 563a50672d8a edc5149a .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/06/15 15:34 upstream 44ef20baed8e f429ab00 .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/06/08 11:24 upstream dc772f8237f9 82c05ab8 .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/06/08 06:03 upstream 96e09b8f8166 82c05ab8 .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/06/01 03:38 upstream d8ec19857b09 3113787f .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/05/21 05:04 upstream daa121128a2d c0f1611a .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/05/11 01:33 upstream f4345f05c0df f7c35481 .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/05/06 17:19 upstream dd5a440a31fa d884b519 .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/05/04 16:12 upstream 7367539ad4b0 610f2a54 .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/04/23 11:44 upstream 71b1543c83d6 21339d7b .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/04/22 12:00 upstream ed30a4a51bb1 36c961ad .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/04/21 01:55 upstream 977b1ef51866 af24b050 .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/04/19 08:35 upstream 2668e3ae2ef3 af24b050 .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/04/16 17:06 upstream 96fca68c4fbf 18f6e127 .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/04/15 02:16 upstream 399f4dae683a c8349e48 .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/04/09 19:17 upstream 20cb38a7af88 f3234354 .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/04/03 17:08 upstream 3e92c1e6cd87 51c4dcff .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/03/31 08:41 upstream 712e14250dd2 6baf5069 .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/03/29 05:21 upstream 317c7bc0ef03 c52bcb23 .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/03/08 03:15 upstream 3aaa8ce7a335 cf82cde1 .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/03/05 16:54 upstream 90d35da658da f39a7eed .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/03/03 13:38 upstream 04b8076df253 25905f5d .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/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.