syzbot


KCSAN: data-race in loop_assign_backing_file / shmem_write_begin (2)

Status: moderation: reported on 2026/01/21 22:02
Subsystems: block
[Documentation on labels]
Reported-by: syzbot+147ede2b25c9a0f1780f@syzkaller.appspotmail.com
First crash: 50d, last: 50d
✨ AI Jobs (2)
ID Workflow Result Correct Bug Created Started Finished Revision Error
52e3ef19-a567-4376-8774-da802ec65696 assessment-kcsan Benign: ✅  Confident: ✅  KCSAN: data-race in loop_assign_backing_file / shmem_write_begin (2) 2026/02/25 02:13 2026/02/25 02:13 2026/02/25 02:23 305c0ec5cd886e2d13738e28e1b2df9b0ec20fc9
b9c2bced-41c4-4f56-bd08-68c693598888 assessment-kcsan 💥 KCSAN: data-race in loop_assign_backing_file / shmem_write_begin (2) 2026/01/23 07:50 2026/01/23 07:50 2026/01/23 07:52 499a21815ec0ab13dbfc80e05fc32aadbc482145 failed to run ["make" "KERNELVERSION=syzkaller" "KERNELRELEASE=syzkaller" "LOCALVERSION=-syzkaller" "-j" "16" "ARCH=x86_64" "CC=ccache clang" "LD=ld.lld" "O=/usr/local/google/home/dvyukov/syzkaller/workdir/cache/build/ad58fd55d5f9d933ea7c043fd238d534c6a70c00" "bzImage" "compile_commands.json"]: exit status 2
Similar bugs (1)
Kernel Title Rank 🛈 Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KCSAN: data-race in loop_assign_backing_file / shmem_write_begin block 6 1 141d 141d 0/29 auto-obsoleted due to no activity on 2025/12/18 18:20

Sample crash report:
==================================================================
BUG: KCSAN: data-race in loop_assign_backing_file / shmem_write_begin

write to 0xffff88811b036510 of 4 bytes by task 4620 on cpu 0:
 mapping_set_gfp_mask include/linux/pagemap.h:377 [inline]
 loop_assign_backing_file+0x80/0x210 drivers/block/loop.c:513
 loop_configure+0x720/0x9c0 drivers/block/loop.c:1060
 lo_ioctl+0x5ac/0x13a0 drivers/block/loop.c:1563
 blkdev_ioctl+0x387/0x460 block/ioctl.c:792
 vfs_ioctl fs/ioctl.c:51 [inline]
 __do_sys_ioctl fs/ioctl.c:597 [inline]
 __se_sys_ioctl+0xce/0x140 fs/ioctl.c:583
 __x64_sys_ioctl+0x43/0x50 fs/ioctl.c:583
 x64_sys_call+0x14b0/0x3000 arch/x86/include/generated/asm/syscalls_64.h:17
 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
 do_syscall_64+0xc0/0x2a0 arch/x86/entry/syscall_64.c:94
 entry_SYSCALL_64_after_hwframe+0x77/0x7f

read to 0xffff88811b036510 of 4 bytes by task 4615 on cpu 1:
 mapping_gfp_mask include/linux/pagemap.h:361 [inline]
 shmem_get_folio mm/shmem.c:2663 [inline]
 shmem_write_begin+0xdc/0x1f0 mm/shmem.c:3315
 generic_perform_write+0x183/0x490 mm/filemap.c:4314
 shmem_file_write_iter+0xc5/0xf0 mm/shmem.c:3490
 new_sync_write fs/read_write.c:593 [inline]
 vfs_write+0x5a6/0x9f0 fs/read_write.c:686
 ksys_write+0xdc/0x1a0 fs/read_write.c:738
 __do_sys_write fs/read_write.c:749 [inline]
 __se_sys_write fs/read_write.c:746 [inline]
 __x64_sys_write+0x40/0x50 fs/read_write.c:746
 x64_sys_call+0x2847/0x3000 arch/x86/include/generated/asm/syscalls_64.h:2
 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
 do_syscall_64+0xc0/0x2a0 arch/x86/entry/syscall_64.c:94
 entry_SYSCALL_64_after_hwframe+0x77/0x7f

value changed: 0x00100cca -> 0x00100c0a

Reported by Kernel Concurrency Sanitizer on:
CPU: 1 UID: 0 PID: 4615 Comm: syz.3.370 Not tainted syzkaller #0 PREEMPT(voluntary) 
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/25/2025
==================================================================

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2026/01/21 22:02 upstream cf38b2340c0e 8fc37797 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in loop_assign_backing_file / shmem_write_begin
* Struck through repros no longer work on HEAD.