[moderation] [mm?] KCSAN: data-race in __lru_add_drain_all / deactivate_file_folio (4)

0 views
Skip to first unread message

syzbot

unread,
Oct 7, 2025, 3:12:27 PM (yesterday) Oct 7
to syzkaller-upst...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: 971199ad2a0f Merge tag 'arm64-fixes' of git://git.kernel.o..
git tree: upstream
console output: https://syzkaller.appspot.com/x/log.txt?x=14a7a304580000
kernel config: https://syzkaller.appspot.com/x/.config?x=6ffeccb21767c55b
dashboard link: https://syzkaller.appspot.com/bug?extid=6d0cfc7b41534e0498aa
compiler: Debian clang version 20.1.8 (++20250708063551+0c9f909b7976-1~exp1~20250708183702.136), Debian LLD 20.1.8
CC: [ak...@linux-foundation.org axelra...@google.com bao...@kernel.org b...@redhat.com chr...@kernel.org kas...@tencent.com linux-...@vger.kernel.org linu...@kvack.org nph...@gmail.com shik...@huaweicloud.com wei...@google.com yua...@google.com]

Unfortunately, I don't have any reproducer for this issue yet.

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/c56fb70a6c65/disk-971199ad.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/38aad1e37a04/vmlinux-971199ad.xz
kernel image: https://storage.googleapis.com/syzbot-assets/6ad6c6a42ba7/bzImage-971199ad.xz

IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: syzbot+6d0cfc...@syzkaller.appspotmail.com

==================================================================
BUG: KCSAN: data-race in __lru_add_drain_all / deactivate_file_folio

read-write to 0xffff888237d25fe8 of 1 bytes by task 13053 on cpu 1:
folio_batch_add include/linux/pagevec.h:77 [inline]
__folio_batch_add_and_move mm/swap.c:194 [inline]
deactivate_file_folio+0xb6/0x1b0 mm/swap.c:695
mapping_try_invalidate+0x2a6/0x3f0 mm/truncate.c:542
invalidate_mapping_pages+0x27/0x40 mm/truncate.c:577
invalidate_bdev+0x58/0x70 block/bdev.c:102
ext4_put_super+0x624/0x7d0 fs/ext4/super.c:1348
generic_shutdown_super+0xe6/0x210 fs/super.c:642
kill_block_super+0x2a/0x70 fs/super.c:1722
ext4_kill_sb+0x42/0x80 fs/ext4/super.c:7403
deactivate_locked_super+0x75/0x1c0 fs/super.c:473
deactivate_super+0x97/0xa0 fs/super.c:506
cleanup_mnt+0x269/0x2e0 fs/namespace.c:1327
__cleanup_mnt+0x19/0x20 fs/namespace.c:1334
task_work_run+0x131/0x1a0 kernel/task_work.c:227
resume_user_mode_work include/linux/resume_user_mode.h:50 [inline]
exit_to_user_mode_loop+0xed/0x110 kernel/entry/common.c:43
exit_to_user_mode_prepare include/linux/irq-entry-common.h:225 [inline]
syscall_exit_to_user_mode_work include/linux/entry-common.h:175 [inline]
syscall_exit_to_user_mode include/linux/entry-common.h:210 [inline]
do_syscall_64+0x1d6/0x200 arch/x86/entry/syscall_64.c:100
entry_SYSCALL_64_after_hwframe+0x77/0x7f

read to 0xffff888237d25fe8 of 1 bytes by task 3002 on cpu 0:
folio_batch_count include/linux/pagevec.h:56 [inline]
cpu_needs_drain mm/swap.c:782 [inline]
__lru_add_drain_all+0x1d5/0x450 mm/swap.c:877
lru_add_drain_all+0x10/0x20 mm/swap.c:893
invalidate_bdev+0x47/0x70 block/bdev.c:101
bdev_disk_changed+0xeb/0xcb0 block/partitions/core.c:657
blkdev_get_whole+0x1f5/0x2d0 block/bdev.c:748
bdev_open+0x280/0x7e0 block/bdev.c:957
bdev_file_open_by_dev+0x1e6/0x250 block/bdev.c:1059
disk_scan_partitions+0x148/0x1b0 block/genhd.c:387
blkdev_common_ioctl+0x10bf/0x1ad0 block/ioctl.c:625
blkdev_ioctl+0x2ee/0x440 block/ioctl.c:699
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+0x1816/0x3000 arch/x86/include/generated/asm/syscalls_64.h:17
do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
do_syscall_64+0xd2/0x200 arch/x86/entry/syscall_64.c:94
entry_SYSCALL_64_after_hwframe+0x77/0x7f

value changed: 0x01 -> 0x02

Reported by Kernel Concurrency Sanitizer on:
CPU: 0 UID: 0 PID: 3002 Comm: udevd Not tainted syzkaller #0 PREEMPT(voluntary)
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 08/18/2025
==================================================================
loop4: p1 p3 < >
loop4: p1 p3 < >


---
This report is generated by a bot. It may contain errors.
See https://goo.gl/tpsmEJ for more information about syzbot.
syzbot engineers can be reached at syzk...@googlegroups.com.

syzbot will keep track of this issue. See:
https://goo.gl/tpsmEJ#status for how to communicate with syzbot.

If the report is already addressed, let syzbot know by replying with:
#syz fix: exact-commit-title

If you want to overwrite report's subsystems, reply with:
#syz set subsystems: new-subsystem
(See the list of subsystem names on the web dashboard)

If the report is a duplicate of another one, reply with:
#syz dup: exact-subject-of-another-report

If you want to undo deduplication, reply with:
#syz undup
Reply all
Reply to author
Forward
0 new messages