syzbot


KCSAN: data-race in __filemap_remove_folio / folio_mapping (2)

Status: upstream: reported on 2023/04/24 07:19
Subsystems: mm
[Documentation on labels]
Reported-by: syzbot+606f94dfeaaa45124c90@syzkaller.appspotmail.com
First crash: 791d, last: 1d08h
Discussions (8)
Title Replies (including bot) Last reply
[syzbot] Monthly mm report (Oct 2024) 0 (1) 2024/10/03 09:02
[syzbot] Monthly mm report (Sep 2024) 0 (1) 2024/09/02 08:17
[syzbot] [fs?] [mm?] KCSAN: data-race in __filemap_remove_folio / folio_mapping (2) 6 (8) 2024/04/18 04:27
[syzbot] Monthly mm report (Feb 2024) 0 (1) 2024/02/17 20:23
[syzbot] Monthly mm report (Nov 2023) 0 (1) 2023/11/15 03:00
[syzbot] Monthly mm report (Sep 2023) 0 (1) 2023/09/11 10:07
[syzbot] Monthly xfs report (Aug 2023) 0 (1) 2023/08/07 08:36
[syzbot] Monthly xfs report (Jun 2023) 0 (1) 2023/06/07 09:24
Similar bugs (1)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KCSAN: data-race in __filemap_remove_folio / folio_mapping block 42 999d 1062d 0/28 auto-closed as invalid on 2022/04/21 14:11

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

write to 0xffffea0004620d58 of 8 bytes by task 13749 on cpu 1:
 page_cache_delete mm/filemap.c:152 [inline]
 __filemap_remove_folio+0x1ac/0x2c0 mm/filemap.c:232
 filemap_remove_folio+0x6b/0x1f0 mm/filemap.c:264
 truncate_inode_folio+0x42/0x50 mm/truncate.c:162
 shmem_undo_range+0x25b/0xa70 mm/shmem.c:1036
 shmem_truncate_range mm/shmem.c:1152 [inline]
 shmem_evict_inode+0x14d/0x530 mm/shmem.c:1280
 evict+0x2f0/0x570 fs/inode.c:796
 iput_final fs/inode.c:1946 [inline]
 iput+0x42a/0x5b0 fs/inode.c:1972
 dentry_unlink_inode+0x24f/0x260 fs/dcache.c:422
 __dentry_kill+0x18b/0x4c0 fs/dcache.c:625
 dput+0x5c/0xd0 fs/dcache.c:867
 __fput+0x3fb/0x6d0 fs/file_table.c:458
 ____fput+0x1c/0x30 fs/file_table.c:478
 task_work_run+0x13a/0x1a0 kernel/task_work.c:239
 exit_task_work include/linux/task_work.h:43 [inline]
 do_exit+0x5dd/0x17f0 kernel/exit.c:938
 do_group_exit+0x102/0x150 kernel/exit.c:1087
 get_signal+0xeb9/0x1000 kernel/signal.c:3017
 arch_do_signal_or_restart+0x95/0x4b0 arch/x86/kernel/signal.c:337
 exit_to_user_mode_loop kernel/entry/common.c:111 [inline]
 exit_to_user_mode_prepare include/linux/entry-common.h:329 [inline]
 irqentry_exit_to_user_mode+0xa7/0x120 kernel/entry/common.c:231
 irqentry_exit+0x12/0x50 kernel/entry/common.c:334
 asm_exc_page_fault+0x26/0x30 arch/x86/include/asm/idtentry.h:623

read to 0xffffea0004620d58 of 8 bytes by task 13776 on cpu 0:
 folio_mapping+0xa0/0x120 mm/util.c:847
 folio_evictable mm/internal.h:435 [inline]
 move_folios_to_lru+0x12a/0x680 mm/vmscan.c:1844
 evict_folios+0x2a21/0x3240 mm/vmscan.c:4630
 try_to_shrink_lruvec+0x5d2/0x750 mm/vmscan.c:4789
 lru_gen_shrink_lruvec mm/vmscan.c:4938 [inline]
 shrink_lruvec+0x22d/0x1840 mm/vmscan.c:5693
 shrink_node_memcgs mm/vmscan.c:5929 [inline]
 shrink_node+0x603/0x1d80 mm/vmscan.c:5970
 shrink_zones mm/vmscan.c:6215 [inline]
 do_try_to_free_pages+0x3c6/0xc50 mm/vmscan.c:6277
 try_to_free_mem_cgroup_pages+0x1e3/0x490 mm/vmscan.c:6609
 try_charge_memcg+0x2bc/0x7f0 mm/memcontrol.c:2238
 obj_cgroup_charge_pages+0xbd/0x1a0 mm/memcontrol.c:2646
 __memcg_kmem_charge_page+0x9d/0x170 mm/memcontrol.c:2673
 __alloc_pages_noprof+0x1bc/0x340 mm/page_alloc.c:4768
 alloc_pages_mpol_noprof+0xb1/0x1e0 mm/mempolicy.c:2269
 alloc_pages_noprof+0xe1/0x100 mm/mempolicy.c:2348
 vm_area_alloc_pages mm/vmalloc.c:3589 [inline]
 __vmalloc_area_node mm/vmalloc.c:3667 [inline]
 __vmalloc_node_range_noprof+0x6eb/0xe80 mm/vmalloc.c:3844
 __kvmalloc_node_noprof+0x121/0x170 mm/util.c:672
 ip_set_alloc+0x1f/0x30 net/netfilter/ipset/ip_set_core.c:261
 hash_netiface_create+0x273/0x730 net/netfilter/ipset/ip_set_hash_gen.h:1568
 ip_set_create+0x359/0x8a0 net/netfilter/ipset/ip_set_core.c:1109
 nfnetlink_rcv_msg+0x4a9/0x570 net/netfilter/nfnetlink.c:302
 netlink_rcv_skb+0x12c/0x230 net/netlink/af_netlink.c:2542
 nfnetlink_rcv+0x16c/0x15d0 net/netfilter/nfnetlink.c:667
 netlink_unicast_kernel net/netlink/af_netlink.c:1321 [inline]
 netlink_unicast+0x599/0x670 net/netlink/af_netlink.c:1347
 netlink_sendmsg+0x5cc/0x6e0 net/netlink/af_netlink.c:1891
 sock_sendmsg_nosec net/socket.c:711 [inline]
 __sock_sendmsg+0x140/0x180 net/socket.c:726
 ____sys_sendmsg+0x312/0x410 net/socket.c:2583
 ___sys_sendmsg net/socket.c:2637 [inline]
 __sys_sendmsg+0x19d/0x230 net/socket.c:2669
 __do_sys_sendmsg net/socket.c:2674 [inline]
 __se_sys_sendmsg net/socket.c:2672 [inline]
 __x64_sys_sendmsg+0x46/0x50 net/socket.c:2672
 x64_sys_call+0x2734/0x2dc0 arch/x86/include/generated/asm/syscalls_64.h:47
 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

value changed: 0xffff8881041c7358 -> 0x0000000000000000

Reported by Kernel Concurrency Sanitizer on:
CPU: 0 UID: 0 PID: 13776 Comm: syz.6.3285 Not tainted 6.13.0-rc2-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/13/2024
==================================================================
syz.6.3285 (13776) used greatest stack depth: 6112 bytes left

Crashes (330):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/12/09 10:09 upstream fac04efc5c79 9ac0fdc6 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __filemap_remove_folio / folio_mapping
2024/12/08 21:26 upstream 62b5a46999c7 9ac0fdc6 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __filemap_remove_folio / folio_mapping
2024/12/08 12:45 upstream 7503345ac5f5 9ac0fdc6 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __filemap_remove_folio / folio_mapping
2024/12/07 18:36 upstream b5f217084ab3 9ac0fdc6 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __filemap_remove_folio / folio_mapping
2024/12/06 02:14 upstream 5076001689e4 29f61fce .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __filemap_remove_folio / folio_mapping
2024/12/05 16:04 upstream feffde684ac2 29f61fce .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __filemap_remove_folio / folio_mapping
2024/12/04 11:35 upstream feffde684ac2 b50eb251 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __filemap_remove_folio / folio_mapping
2024/12/03 02:07 upstream cdd30ebb1b9f 578925bc .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __filemap_remove_folio / folio_mapping
2024/12/02 12:54 upstream e70140ba0d2b b499ea68 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __filemap_remove_folio / folio_mapping
2024/12/01 09:32 upstream bcc8eda6d349 68914665 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __filemap_remove_folio / folio_mapping
2024/11/29 23:46 upstream 509f806f7f70 5df23865 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __filemap_remove_folio / folio_mapping
2024/11/29 00:21 upstream 7af08b57bcb9 5df23865 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __filemap_remove_folio / folio_mapping
2024/11/28 01:17 upstream 7d4050728c83 5df23865 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __filemap_remove_folio / folio_mapping
2024/11/27 13:42 upstream aaf20f870da0 52b38cc1 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __filemap_remove_folio / folio_mapping
2024/11/26 17:44 upstream 2c22dc1ee3a1 e9a9a9f2 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __filemap_remove_folio / folio_mapping
2024/11/25 21:36 upstream 9f16d5e6f220 11dbc254 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __filemap_remove_folio / folio_mapping
2024/11/24 11:40 upstream 9f16d5e6f220 68da6d95 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __filemap_remove_folio / folio_mapping
2024/11/22 07:40 upstream 28eb75e178d3 4b25d554 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __filemap_remove_folio / folio_mapping
2024/11/20 23:18 upstream 8f7c8b88bda4 4fca1650 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __filemap_remove_folio / folio_mapping
2024/11/20 08:51 upstream bf9aa14fc523 7d02db5a .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __filemap_remove_folio / folio_mapping
2024/11/20 00:40 upstream 158f238aa69d 7d02db5a .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __filemap_remove_folio / folio_mapping
2024/11/18 17:03 upstream adc218676eef e7bb5d6e .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __filemap_remove_folio / folio_mapping
2024/11/17 10:02 upstream b5a24181e461 cfe3a04a .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __filemap_remove_folio / folio_mapping
2024/11/16 03:46 upstream f868cd251776 cfe3a04a .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __filemap_remove_folio / folio_mapping
2024/11/12 06:47 upstream 2d5404caa8c7 75bb1b32 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __filemap_remove_folio / folio_mapping
2024/11/11 18:07 upstream 2d5404caa8c7 0c4b1325 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __filemap_remove_folio / folio_mapping
2024/11/11 04:02 upstream a9cda7c0ffed 6b856513 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __filemap_remove_folio / folio_mapping
2024/11/10 13:26 upstream de2f378f2b77 6b856513 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __filemap_remove_folio / folio_mapping
2024/11/07 07:49 upstream 7758b206117d df3dc63b .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __filemap_remove_folio / folio_mapping
2024/11/06 09:17 upstream 2e1b3cc9d7f7 3a465482 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __filemap_remove_folio / folio_mapping
2024/11/05 00:32 upstream 557329bcecc2 509da429 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __filemap_remove_folio / folio_mapping
2024/11/01 10:56 upstream 5635f189425e 96eb609f .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __filemap_remove_folio / folio_mapping
2024/10/31 20:50 upstream 0fc810ae3ae1 96eb609f .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __filemap_remove_folio / folio_mapping
2024/10/26 16:37 upstream 850925a8133c 65e8686b .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __filemap_remove_folio / folio_mapping
2024/10/24 18:51 upstream c2ee9f594da8 0d144d1a .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __filemap_remove_folio / folio_mapping
2024/10/22 09:37 upstream d12937763990 a93682b3 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __filemap_remove_folio / folio_mapping
2024/10/21 17:23 upstream 42f7652d3eb5 f1e4447c .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __filemap_remove_folio / folio_mapping
2024/10/20 18:36 upstream 715ca9dd687f cd6fc0a3 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __filemap_remove_folio / folio_mapping
2024/10/17 01:11 upstream c964ced77262 666f77ed .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __filemap_remove_folio / folio_mapping
2024/10/14 09:09 upstream 6485cf5ea253 084d8178 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __filemap_remove_folio / folio_mapping
2024/10/08 14:36 upstream 87d6aab2389e 402f1df0 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __filemap_remove_folio / folio_mapping
2024/09/26 23:15 upstream 11a299a7933e 9314348a .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __filemap_remove_folio / folio_mapping
2024/09/26 13:30 upstream 11a299a7933e 0d19f247 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __filemap_remove_folio / folio_mapping
2024/09/21 14:37 upstream 1868f9d0260e 6f888b75 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __filemap_remove_folio / folio_mapping
2024/09/19 17:41 upstream 839c4f596f89 c673ca06 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __filemap_remove_folio / folio_mapping
2024/09/19 06:33 upstream 4a39ac5b7d62 c673ca06 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __filemap_remove_folio / folio_mapping
2024/09/17 11:13 upstream a430d95c5efa c673ca06 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __filemap_remove_folio / folio_mapping
2024/09/12 20:12 upstream 77f587896757 60e1a995 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __filemap_remove_folio / folio_mapping
2024/09/10 21:55 upstream 8d8d276ba2fb 86aa7bd7 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __filemap_remove_folio / folio_mapping
2024/09/09 13:43 upstream da3ea35007d0 073f8be2 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __filemap_remove_folio / folio_mapping
2024/09/09 01:50 upstream 5dadc1be8fc5 9750182a .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __filemap_remove_folio / folio_mapping
2023/04/23 07:32 upstream 622322f53c6d 2b32bd34 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __filemap_remove_folio / folio_mapping
2023/04/16 16:53 upstream 3e7bb4f24617 ec410564 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __filemap_remove_folio / folio_mapping
2023/04/10 04:10 upstream 09a9639e56c0 71147e29 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __filemap_remove_folio / folio_mapping
2022/10/11 17:24 upstream 60bb8154d1d7 02b6492e .config console log report info [disk image] [vmlinux] ci2-upstream-kcsan-gce KCSAN: data-race in __filemap_remove_folio / folio_mapping
* Struck through repros no longer work on HEAD.