syzbot


KCSAN: data-race in __lru_add_drain_all / folio_add_lru

Status: moderation: reported on 2021/12/14 17:42
Subsystems: mm
[Documentation on labels]
Reported-by: syzbot+d676f4fcc6452f55d1d0@syzkaller.appspotmail.com
First crash: 1114d, last: 10h32m

Sample crash report:
EXT4-fs (loop1): unmounting filesystem 00000000-0000-0000-0000-000000000000.
==================================================================
BUG: KCSAN: data-race in __lru_add_drain_all / folio_add_lru

read-write to 0xffff888237c2aca8 of 1 bytes by task 5665 on cpu 0:
 folio_batch_add include/linux/pagevec.h:77 [inline]
 __folio_batch_add_and_move mm/swap.c:225 [inline]
 folio_add_lru+0xa3/0x1f0 mm/swap.c:513
 folio_add_lru_vma+0x48/0x60 mm/swap.c:532
 wp_page_copy mm/memory.c:3421 [inline]
 do_wp_page+0x17a5/0x2340 mm/memory.c:3745
 handle_pte_fault mm/memory.c:5782 [inline]
 __handle_mm_fault mm/memory.c:5909 [inline]
 handle_mm_fault+0xc47/0x2aa0 mm/memory.c:6077
 do_user_addr_fault arch/x86/mm/fault.c:1389 [inline]
 handle_page_fault arch/x86/mm/fault.c:1481 [inline]
 exc_page_fault+0x296/0x650 arch/x86/mm/fault.c:1539
 asm_exc_page_fault+0x26/0x30 arch/x86/include/asm/idtentry.h:623
 __put_user_nocheck_4+0x7/0x20 arch/x86/lib/putuser.S:95
 ____sys_recvmsg+0x1a3/0x280 net/socket.c:2814
 ___sys_recvmsg net/socket.c:2843 [inline]
 do_recvmmsg+0x2aa/0x6d0 net/socket.c:2938
 __sys_recvmmsg net/socket.c:3012 [inline]
 __do_sys_recvmmsg net/socket.c:3035 [inline]
 __se_sys_recvmmsg net/socket.c:3028 [inline]
 __x64_sys_recvmmsg+0xe2/0x170 net/socket.c:3028
 x64_sys_call+0x2a9a/0x2dc0 arch/x86/include/generated/asm/syscalls_64.h:300
 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 0xffff888237c2aca8 of 1 bytes by task 3321 on cpu 1:
 folio_batch_count include/linux/pagevec.h:56 [inline]
 cpu_needs_drain mm/swap.c:772 [inline]
 __lru_add_drain_all+0x136/0x3f0 mm/swap.c:866
 lru_add_drain_all+0x10/0x20 mm/swap.c:882
 invalidate_bdev+0x47/0x70 block/bdev.c:101
 ext4_put_super+0x571/0x840 fs/ext4/super.c:1356
 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:7379
 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:329 [inline]
 __syscall_exit_to_user_mode_work kernel/entry/common.c:207 [inline]
 syscall_exit_to_user_mode+0xa8/0x120 kernel/entry/common.c:218
 do_syscall_64+0xd6/0x1c0 arch/x86/entry/common.c:89
 entry_SYSCALL_64_after_hwframe+0x77/0x7f

value changed: 0x19 -> 0x1a

Reported by Kernel Concurrency Sanitizer on:
CPU: 1 UID: 0 PID: 3321 Comm: syz-executor Not tainted 6.12.0-syzkaller-01892-g8f7c8b88bda4 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/30/2024
==================================================================

Crashes (1029):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/11/20 20:25 upstream 8f7c8b88bda4 4fca1650 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __lru_add_drain_all / folio_add_lru
2024/11/20 14:24 upstream bf9aa14fc523 4fca1650 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __lru_add_drain_all / folio_add_lru
2024/11/20 06:45 upstream bf9aa14fc523 7d02db5a .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __lru_add_drain_all / folio_add_lru
2024/11/19 19:35 upstream 158f238aa69d 7d02db5a .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __lru_add_drain_all / folio_add_lru
2024/11/19 01:06 upstream 23acd177540d 571351cb .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __lru_add_drain_all / folio_add_lru
2024/11/18 10:19 upstream adc218676eef e7bb5d6e .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __lru_add_drain_all / folio_add_lru
2024/11/18 04:24 upstream adc218676eef cfe3a04a .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __lru_add_drain_all / folio_add_lru
2024/11/17 16:59 upstream 4a5df3796467 cfe3a04a .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __lru_add_drain_all / folio_add_lru
2024/11/17 08:28 upstream b5a24181e461 cfe3a04a .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __lru_add_drain_all / folio_add_lru
2024/11/17 08:26 upstream b5a24181e461 cfe3a04a .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __lru_add_drain_all / folio_add_lru
2024/11/15 19:56 upstream f868cd251776 cfe3a04a .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __lru_add_drain_all / folio_add_lru
2024/11/15 18:02 upstream cfaaa7d010d1 cfe3a04a .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __lru_add_drain_all / folio_add_lru
2024/11/15 12:53 upstream cfaaa7d010d1 f6ede3a3 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __lru_add_drain_all / folio_add_lru
2024/11/15 04:08 upstream cfaaa7d010d1 a8c99394 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __lru_add_drain_all / folio_add_lru
2024/11/14 11:42 upstream 0a9b9d17f3a7 a8c99394 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __lru_add_drain_all / folio_add_lru
2024/11/13 18:51 upstream f1b785f4c787 bb3f8425 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __lru_add_drain_all / folio_add_lru
2024/11/13 10:00 upstream f1b785f4c787 62026c85 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __lru_add_drain_all / folio_add_lru
2024/11/12 22:51 upstream 3022e9d00ebe 62026c85 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __lru_add_drain_all / folio_add_lru
2024/11/12 08:42 upstream 2d5404caa8c7 75bb1b32 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __lru_add_drain_all / folio_add_lru
2024/11/11 11:30 upstream 2d5404caa8c7 0c4b1325 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __lru_add_drain_all / folio_add_lru
2024/11/11 08:50 upstream 2d5404caa8c7 6b856513 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __lru_add_drain_all / folio_add_lru
2024/11/10 21:08 upstream a9cda7c0ffed 6b856513 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __lru_add_drain_all / folio_add_lru
2024/11/10 04:23 upstream de2f378f2b77 6b856513 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __lru_add_drain_all / folio_add_lru
2024/11/09 14:24 upstream da4373fbcf00 6b856513 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __lru_add_drain_all / folio_add_lru
2024/11/08 20:25 upstream f1dce1f09380 6b856513 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __lru_add_drain_all / folio_add_lru
2024/11/08 08:44 upstream 906bd684e4b1 179b040e .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __lru_add_drain_all / folio_add_lru
2024/11/07 02:31 upstream 7758b206117d df3dc63b .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __lru_add_drain_all / folio_add_lru
2024/11/06 09:11 upstream 2e1b3cc9d7f7 3a465482 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __lru_add_drain_all / folio_add_lru
2024/11/05 18:23 upstream 2e1b3cc9d7f7 da38b4c9 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __lru_add_drain_all / folio_add_lru
2024/11/05 01:42 upstream 557329bcecc2 509da429 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __lru_add_drain_all / folio_add_lru
2024/11/03 22:31 upstream a33ab3f94f51 f00eed24 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __lru_add_drain_all / folio_add_lru
2024/11/02 11:23 upstream 11066801dd4b f00eed24 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __lru_add_drain_all / folio_add_lru
2024/11/01 19:46 upstream 6c52d4da1c74 f00eed24 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __lru_add_drain_all / folio_add_lru
2024/11/01 03:43 upstream 5635f189425e 96eb609f .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __lru_add_drain_all / folio_add_lru
2024/10/31 20:25 upstream 0fc810ae3ae1 96eb609f .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __lru_add_drain_all / folio_add_lru
2024/10/30 07:49 upstream c1e939a21eb1 66aeb999 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __lru_add_drain_all / folio_add_lru
2024/10/29 23:32 upstream e42b1a9a2557 66aeb999 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __lru_add_drain_all / folio_add_lru
2024/10/28 21:56 upstream 819837584309 9efb3cc7 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __lru_add_drain_all / folio_add_lru
2024/10/28 01:42 upstream 284a2f899676 65e8686b .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __lru_add_drain_all / folio_add_lru
2024/10/26 12:35 upstream 850925a8133c 65e8686b .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __lru_add_drain_all / folio_add_lru
2024/10/25 12:59 upstream ae90f6a6170d 045e728d .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __lru_add_drain_all / folio_add_lru
2024/10/25 10:10 upstream 4e46774408d9 c79b8ca5 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __lru_add_drain_all / folio_add_lru
2024/10/24 13:29 upstream c2ee9f594da8 0d144d1a .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __lru_add_drain_all / folio_add_lru
2024/10/23 03:45 upstream c2ee9f594da8 15fa2979 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __lru_add_drain_all / folio_add_lru
2024/10/21 22:03 upstream d12937763990 f1e4447c .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __lru_add_drain_all / folio_add_lru
2024/10/21 12:53 upstream 42f7652d3eb5 f1e4447c .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __lru_add_drain_all / folio_add_lru
2024/10/20 18:26 upstream 715ca9dd687f cd6fc0a3 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __lru_add_drain_all / folio_add_lru
2024/10/19 18:45 upstream 3d5ad2d4eca3 cd6fc0a3 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __lru_add_drain_all / folio_add_lru
2024/10/19 00:41 upstream b04ae0f45168 cd6fc0a3 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __lru_add_drain_all / folio_add_lru
2024/10/18 11:46 upstream 4d939780b705 666f77ed .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __lru_add_drain_all / folio_add_lru
2021/12/14 16:36 upstream 5472f14a3742 d018dd31 .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in __lru_add_drain_all / folio_add_lru
2021/11/02 13:42 upstream bfc484fe6abb 098b5d53 .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in __lru_add_drain_all / folio_add_lru
* Struck through repros no longer work on HEAD.