syzbot


KCSAN: data-race in __lru_add_drain_all / folios_put_refs

Status: moderation: reported on 2024/04/07 23:10
Subsystems: mm
[Documentation on labels]
Reported-by: syzbot+ec770cf118c16e8397fa@syzkaller.appspotmail.com
First crash: 247d, last: 3d01h

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

write to 0xffff888237c2ab68 of 1 bytes by task 18732 on cpu 0:
 folio_batch_reinit include/linux/pagevec.h:50 [inline]
 folios_put_refs+0x26d/0x2b0 mm/swap.c:956
 folios_put include/linux/mm.h:1547 [inline]
 folio_batch_move_lru+0x202/0x230 mm/swap.c:175
 __folio_batch_add_and_move mm/swap.c:196 [inline]
 folio_add_lru+0x145/0x1f0 mm/swap.c:482
 shmem_alloc_and_add_folio mm/shmem.c:1892 [inline]
 shmem_get_folio_gfp+0x7d6/0xd90 mm/shmem.c:2355
 shmem_get_folio mm/shmem.c:2461 [inline]
 shmem_write_begin+0xa2/0x180 mm/shmem.c:3117
 generic_perform_write+0x1a8/0x4a0 mm/filemap.c:4055
 shmem_file_write_iter+0xc2/0xe0 mm/shmem.c:3293
 new_sync_write fs/read_write.c:586 [inline]
 vfs_write+0x77f/0x920 fs/read_write.c:679
 ksys_write+0xe8/0x1b0 fs/read_write.c:731
 __do_sys_write fs/read_write.c:742 [inline]
 __se_sys_write fs/read_write.c:739 [inline]
 __x64_sys_write+0x42/0x50 fs/read_write.c:739
 x64_sys_call+0x287e/0x2dc0 arch/x86/include/generated/asm/syscalls_64.h:2
 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 0xffff888237c2ab68 of 1 bytes by task 3300 on cpu 1:
 folio_batch_count include/linux/pagevec.h:56 [inline]
 cpu_needs_drain mm/swap.c:741 [inline]
 __lru_add_drain_all+0x136/0x3f0 mm/swap.c:835
 lru_add_drain_all+0x10/0x20 mm/swap.c:851
 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: 0x1f -> 0x04

Reported by Kernel Concurrency Sanitizer on:
CPU: 1 UID: 0 PID: 3300 Comm: syz-executor Not tainted 6.13.0-rc1-syzkaller-00337-g7503345ac5f5 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/13/2024
==================================================================
EXT4-fs (loop0): unmounting filesystem 76b65be2-f6da-4727-8c75-0525a5b65a09.

Crashes (74):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/12/08 00:00 upstream 7503345ac5f5 9ac0fdc6 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __lru_add_drain_all / folios_put_refs
2024/12/04 13:33 upstream feffde684ac2 b50eb251 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __lru_add_drain_all / folios_put_refs
2024/11/27 12:58 upstream aaf20f870da0 52b38cc1 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __lru_add_drain_all / folios_put_refs
2024/11/27 02:13 upstream 445d9f05fa14 e9a9a9f2 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __lru_add_drain_all / folios_put_refs
2024/11/26 11:00 upstream 2c22dc1ee3a1 e9a9a9f2 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __lru_add_drain_all / folios_put_refs
2024/11/25 21:16 upstream 9f16d5e6f220 11dbc254 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __lru_add_drain_all / folios_put_refs
2024/11/21 01:16 upstream 8f7c8b88bda4 4b25d554 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __lru_add_drain_all / folios_put_refs
2024/11/16 12:38 upstream e8bdb3c8be08 cfe3a04a .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __lru_add_drain_all / folios_put_refs
2024/11/07 12:23 upstream ff7afaeca1a1 867e44df .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __lru_add_drain_all / folios_put_refs
2024/10/31 12:41 upstream 4236f913808c 96eb609f .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __lru_add_drain_all / folios_put_refs
2024/10/28 13:40 upstream 819837584309 65e8686b .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __lru_add_drain_all / folios_put_refs
2024/10/22 13:36 upstream d12937763990 a93682b3 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __lru_add_drain_all / folios_put_refs
2024/10/21 02:58 upstream 42f7652d3eb5 cd6fc0a3 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __lru_add_drain_all / folios_put_refs
2024/10/15 23:08 upstream 2f87d0916ce0 bde2d81c .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __lru_add_drain_all / folios_put_refs
2024/10/13 04:21 upstream 7234e2ea0edd 084d8178 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __lru_add_drain_all / folios_put_refs
2024/10/08 19:34 upstream 5b7c893ed5ed 402f1df0 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __lru_add_drain_all / folios_put_refs
2024/10/07 22:01 upstream 87d6aab2389e d7906eff .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __lru_add_drain_all / folios_put_refs
2024/10/06 12:41 upstream 8f602276d390 d7906eff .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __lru_add_drain_all / folios_put_refs
2024/10/02 21:53 upstream f23aa4c0761a 02f9582a .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __lru_add_drain_all / folios_put_refs
2024/10/02 14:10 upstream e32cde8d2bd7 02f9582a .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __lru_add_drain_all / folios_put_refs
2024/09/30 22:18 upstream 9852d85ec9d4 bbd4e0a4 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __lru_add_drain_all / folios_put_refs
2024/09/28 06:33 upstream 3630400697a3 440b26ec .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __lru_add_drain_all / folios_put_refs
2024/09/19 20:00 upstream 2004cef11ea0 6f888b75 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __lru_add_drain_all / folios_put_refs
2024/09/11 20:21 upstream 7c6a3a65ace7 d94c83d8 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __lru_add_drain_all / folios_put_refs
2024/09/11 11:58 upstream 8d8d276ba2fb 8ab55d0e .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __lru_add_drain_all / folios_put_refs
2024/09/10 06:24 upstream bc83b4d1f086 784df80e .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __lru_add_drain_all / folios_put_refs
2024/09/04 17:12 upstream c7fb1692dc01 9d47f20a .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __lru_add_drain_all / folios_put_refs
2024/09/04 06:09 upstream 88fac17500f4 9d47f20a .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __lru_add_drain_all / folios_put_refs
2024/09/02 03:44 upstream c9f016e72b5c 1eda0d14 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __lru_add_drain_all / folios_put_refs
2024/08/26 16:36 upstream 5be63fc19fca 9aee4e0b .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __lru_add_drain_all / folios_put_refs
2024/08/24 17:06 upstream d2bafcf224f3 d7d32352 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __lru_add_drain_all / folios_put_refs
2024/08/23 19:37 upstream 3d5f968a177d d7d32352 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __lru_add_drain_all / folios_put_refs
2024/08/19 15:50 upstream 47ac09b91bef 9f0ab3fb .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __lru_add_drain_all / folios_put_refs
2024/08/14 11:18 upstream 6b0f8db921ab 07a4d4ad .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __lru_add_drain_all / folios_put_refs
2024/08/07 10:17 upstream d4560686726f 1ef9fe42 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __lru_add_drain_all / folios_put_refs
2024/08/02 07:20 upstream c0ecd6388360 1e9c4cf3 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __lru_add_drain_all / folios_put_refs
2024/07/28 11:44 upstream 5437f30d3458 46eb10b7 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __lru_add_drain_all / folios_put_refs
2024/07/25 23:55 upstream 1722389b0d86 3f86dfed .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __lru_add_drain_all / folios_put_refs
2024/07/24 22:00 upstream d1e9a63dcd72 d1a1b0ca .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __lru_add_drain_all / folios_put_refs
2024/07/23 13:26 upstream 66ebbdfdeb09 e50e8da5 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __lru_add_drain_all / folios_put_refs
2024/07/23 02:10 upstream 66ebbdfdeb09 708c10c4 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __lru_add_drain_all / folios_put_refs
2024/07/15 22:46 upstream 5e0497553643 e8709b21 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __lru_add_drain_all / folios_put_refs
2024/07/15 10:23 upstream 0c3836482481 c605e6a2 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __lru_add_drain_all / folios_put_refs
2024/07/12 19:58 upstream 43db1e03c086 eaeb5c15 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __lru_add_drain_all / folios_put_refs
2024/07/04 09:10 upstream 795c58e4c7fc 3f2748a3 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __lru_add_drain_all / folios_put_refs
2024/07/03 00:14 upstream e9d22f7a6655 07f0a0a0 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __lru_add_drain_all / folios_put_refs
2024/07/02 10:40 upstream 1dfe225e9af5 07f0a0a0 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __lru_add_drain_all / folios_put_refs
2024/06/28 15:21 upstream 5bbd9b249880 757f06b1 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __lru_add_drain_all / folios_put_refs
2024/06/27 07:06 upstream afcd48134c58 c6d33a01 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __lru_add_drain_all / folios_put_refs
2024/06/23 22:39 upstream 7c16f0a4ed1c edc5149a .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __lru_add_drain_all / folios_put_refs
2024/06/21 18:25 upstream 50736169ecc8 edc5149a .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __lru_add_drain_all / folios_put_refs
2024/06/12 20:59 upstream cea2a26553ac f815599d .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __lru_add_drain_all / folios_put_refs
2024/06/12 01:12 upstream 2ef5971ff345 4d75f4f7 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __lru_add_drain_all / folios_put_refs
2024/06/10 10:40 upstream 83a7eefedc9b 82c05ab8 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __lru_add_drain_all / folios_put_refs
2024/06/08 22:20 upstream dc772f8237f9 82c05ab8 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __lru_add_drain_all / folios_put_refs
2024/06/07 04:58 upstream d30d0e49da71 121701b6 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __lru_add_drain_all / folios_put_refs
2024/06/03 21:29 upstream f06ce441457d a1feae05 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __lru_add_drain_all / folios_put_refs
2024/05/29 20:49 upstream 4a4be1ad3a6e 34889ee3 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __lru_add_drain_all / folios_put_refs
2024/05/27 14:31 upstream 1613e604df0c 761766e6 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __lru_add_drain_all / folios_put_refs
2024/05/26 19:50 upstream c13320499ba0 a10a183e .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __lru_add_drain_all / folios_put_refs
2024/05/19 00:46 upstream 4b377b4868ef c0f1611a .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __lru_add_drain_all / folios_put_refs
2024/05/12 01:56 upstream cf87f46fd34d 9026e142 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __lru_add_drain_all / folios_put_refs
2024/05/10 04:12 upstream 448b3fe5a0ea de979bc2 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __lru_add_drain_all / folios_put_refs
2024/05/05 22:27 upstream b9158815de52 610f2a54 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __lru_add_drain_all / folios_put_refs
2024/05/05 15:43 upstream 7367539ad4b0 610f2a54 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __lru_add_drain_all / folios_put_refs
2024/05/02 07:13 upstream 0106679839f7 3ba885bc .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __lru_add_drain_all / folios_put_refs
2024/04/30 10:29 upstream 98369dccd2f8 f10afd69 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __lru_add_drain_all / folios_put_refs
2024/04/27 09:43 upstream 5eb4573ea63d 07b455f9 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __lru_add_drain_all / folios_put_refs
2024/04/18 23:56 upstream 2668e3ae2ef3 af24b050 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __lru_add_drain_all / folios_put_refs
2024/04/17 18:43 upstream 4b6b51322118 acc528cb .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __lru_add_drain_all / folios_put_refs
2024/04/16 23:58 upstream 96fca68c4fbf 18f6e127 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __lru_add_drain_all / folios_put_refs
2024/04/16 09:11 upstream 96fca68c4fbf 0d592ce4 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __lru_add_drain_all / folios_put_refs
2024/04/15 13:20 upstream 0bbac3facb5d b9af7e61 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __lru_add_drain_all / folios_put_refs
2024/04/07 23:10 upstream 9fe30842a90b ca620dd8 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __lru_add_drain_all / folios_put_refs
* Struck through repros no longer work on HEAD.