[moderation] [mm?] KCSAN: data-race in mlock_new_folio / need_mlock_drain (3)

0 views
Skip to first unread message

syzbot

unread,
Apr 10, 2024, 11:51:19 PMApr 10
to syzkaller-upst...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: 9875c0beb8ad Merge tag 'media/v6.9-2' of git://git.kernel...
git tree: upstream
console output: https://syzkaller.appspot.com/x/log.txt?x=12939bd3180000
kernel config: https://syzkaller.appspot.com/x/.config?x=6a1ac6d65bf295c5
dashboard link: https://syzkaller.appspot.com/bug?extid=68fbd83d6f243168acea
compiler: Debian clang version 15.0.6, GNU ld (GNU Binutils for Debian) 2.40
CC: [ak...@linux-foundation.org linux-...@vger.kernel.org linu...@kvack.org]

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

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/092d24a777b9/disk-9875c0be.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/f7293189ba1a/vmlinux-9875c0be.xz
kernel image: https://storage.googleapis.com/syzbot-assets/f9d2a97aaf72/bzImage-9875c0be.xz

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

EXT4-fs (loop2): unmounting filesystem 00000000-0000-0000-0000-000000000000.
==================================================================
BUG: KCSAN: data-race in mlock_new_folio / need_mlock_drain

read-write to 0xffff888237d2b410 of 1 bytes by task 28861 on cpu 1:
folio_batch_add include/linux/pagevec.h:77 [inline]
mlock_new_folio+0x114/0x200 mm/mlock.c:280
folio_add_lru_vma+0x15d/0x170 mm/swap.c:550
do_anonymous_page mm/memory.c:4480 [inline]
do_pte_missing mm/memory.c:3878 [inline]
handle_pte_fault mm/memory.c:5300 [inline]
__handle_mm_fault mm/memory.c:5441 [inline]
handle_mm_fault+0x2312/0x27e0 mm/memory.c:5606
faultin_page mm/gup.c:958 [inline]
__get_user_pages+0x403/0xe50 mm/gup.c:1241
populate_vma_page_range mm/gup.c:1681 [inline]
__mm_populate+0x204/0x340 mm/gup.c:1790
mm_populate include/linux/mm.h:3411 [inline]
__do_sys_mremap mm/mremap.c:1169 [inline]
__se_sys_mremap+0x79a/0xe10 mm/mremap.c:975
__x64_sys_mremap+0x67/0x80 mm/mremap.c:975
x64_sys_call+0xff4/0x2d30 arch/x86/include/generated/asm/syscalls_64.h:26
do_syscall_x64 arch/x86/entry/common.c:52 [inline]
do_syscall_64+0xcd/0x1d0 arch/x86/entry/common.c:83
entry_SYSCALL_64_after_hwframe+0x77/0x7f

read to 0xffff888237d2b410 of 1 bytes by task 28633 on cpu 0:
folio_batch_count include/linux/pagevec.h:56 [inline]
need_mlock_drain+0x30/0x50 mm/mlock.c:235
cpu_needs_drain mm/swap.c:816 [inline]
__lru_add_drain_all+0x240/0x420 mm/swap.c:904
lru_add_drain_all+0x10/0x20 mm/swap.c:920
invalidate_bdev+0x54/0x80 block/bdev.c:95
ext4_put_super+0x51b/0x7e0 fs/ext4/super.c:1361
generic_shutdown_super+0xde/0x210 fs/super.c:641
kill_block_super+0x2a/0x70 fs/super.c:1675
ext4_kill_sb+0x44/0x80 fs/ext4/super.c:7327
deactivate_locked_super+0x7d/0x1c0 fs/super.c:472
deactivate_super+0x9f/0xb0 fs/super.c:505
cleanup_mnt+0x272/0x2e0 fs/namespace.c:1267
__cleanup_mnt+0x19/0x20 fs/namespace.c:1274
task_work_run+0x13a/0x1a0 kernel/task_work.c:180
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:328 [inline]
__syscall_exit_to_user_mode_work kernel/entry/common.c:207 [inline]
syscall_exit_to_user_mode+0xbe/0x130 kernel/entry/common.c:218
do_syscall_64+0xda/0x1d0 arch/x86/entry/common.c:89
entry_SYSCALL_64_after_hwframe+0x77/0x7f

value changed: 0x1d -> 0x1e

Reported by Kernel Concurrency Sanitizer on:
CPU: 0 PID: 28633 Comm: syz-executor.2 Tainted: G W 6.9.0-rc3-syzkaller-00068-g9875c0beb8ad #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/27/2024
==================================================================
EXT4-fs (loop2): unmounting filesystem 00000000-0000-0000-0000-000000000000.


---
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