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

4 views
Skip to first unread message

syzbot

unread,
Dec 16, 2023, 6:41:22 PM12/16/23
to syzkaller-upst...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: c8e97fc6b4c0 Merge tag 'arm64-fixes' of git://git.kernel.o..
git tree: upstream
console output: https://syzkaller.appspot.com/x/log.txt?x=1337da1ee80000
kernel config: https://syzkaller.appspot.com/x/.config?x=e9b421b7b0976d59
dashboard link: https://syzkaller.appspot.com/bug?extid=aeb5366e251035c94082
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/94e7e939ce47/disk-c8e97fc6.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/f7432fadc8b3/vmlinux-c8e97fc6.xz
kernel image: https://storage.googleapis.com/syzbot-assets/de8364e76ded/bzImage-c8e97fc6.xz

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

==================================================================
BUG: KCSAN: data-race in munlock_folio / need_mlock_drain

read-write to 0xffff888237c29f28 of 1 bytes by task 30782 on cpu 0:
folio_batch_add include/linux/pagevec.h:74 [inline]
munlock_folio+0x3c/0x120 mm/mlock.c:302
munlock_vma_folio mm/internal.h:687 [inline]
page_remove_rmap+0x1b8/0x260 mm/rmap.c:1508
zap_pte_range mm/memory.c:1465 [inline]
zap_pmd_range mm/memory.c:1583 [inline]
zap_pud_range mm/memory.c:1612 [inline]
zap_p4d_range mm/memory.c:1633 [inline]
unmap_page_range+0xdb6/0x1cd0 mm/memory.c:1654
unmap_single_vma+0x142/0x1d0 mm/memory.c:1700
unmap_vmas+0x18d/0x280 mm/memory.c:1744
exit_mmap+0x167/0x640 mm/mmap.c:3308
__mmput+0x28/0x1c0 kernel/fork.c:1349
mmput+0x4c/0x60 kernel/fork.c:1371
exit_mm+0xe3/0x180 kernel/exit.c:567
do_exit+0x585/0x16d0 kernel/exit.c:856
do_group_exit+0x101/0x150 kernel/exit.c:1018
get_signal+0xf4e/0x10a0 kernel/signal.c:2904
arch_do_signal_or_restart+0x95/0x4b0 arch/x86/kernel/signal.c:309
exit_to_user_mode_loop+0x6f/0xe0 kernel/entry/common.c:168
exit_to_user_mode_prepare+0x6c/0xb0 kernel/entry/common.c:204
__syscall_exit_to_user_mode_work kernel/entry/common.c:285 [inline]
syscall_exit_to_user_mode+0x26/0x140 kernel/entry/common.c:296
do_syscall_64+0x50/0x110 arch/x86/entry/common.c:89
entry_SYSCALL_64_after_hwframe+0x63/0x6b

read to 0xffff888237c29f28 of 1 bytes by task 3107 on cpu 1:
folio_batch_count include/linux/pagevec.h:53 [inline]
need_mlock_drain+0x30/0x50 mm/mlock.c:236
cpu_needs_drain mm/swap.c:801 [inline]
__lru_add_drain_all+0x240/0x420 mm/swap.c:889
lru_add_drain_all+0x10/0x20 mm/swap.c:905
invalidate_bdev+0x54/0x70 block/bdev.c:86
ext4_put_super+0x51b/0x7e0 fs/ext4/super.c:1361
generic_shutdown_super+0xdb/0x210 fs/super.c:696
kill_block_super+0x2a/0x60 fs/super.c:1667
ext4_kill_sb+0x44/0x80 fs/ext4/super.c:7330
deactivate_locked_super+0x7a/0x1c0 fs/super.c:484
deactivate_super+0x9b/0xb0 fs/super.c:517
cleanup_mnt+0x272/0x2e0 fs/namespace.c:1256
__cleanup_mnt+0x19/0x20 fs/namespace.c:1263
task_work_run+0x135/0x1a0 kernel/task_work.c:180
resume_user_mode_work include/linux/resume_user_mode.h:49 [inline]
exit_to_user_mode_loop+0xd6/0xe0 kernel/entry/common.c:171
exit_to_user_mode_prepare+0x6c/0xb0 kernel/entry/common.c:204
__syscall_exit_to_user_mode_work kernel/entry/common.c:285 [inline]
syscall_exit_to_user_mode+0x26/0x140 kernel/entry/common.c:296
do_syscall_64+0x50/0x110 arch/x86/entry/common.c:89
entry_SYSCALL_64_after_hwframe+0x63/0x6b

value changed: 0x08 -> 0x0f

Reported by Kernel Concurrency Sanitizer on:
CPU: 1 PID: 3107 Comm: syz-executor.4 Not tainted 6.7.0-rc5-syzkaller-00214-gc8e97fc6b4c0 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 11/17/2023
==================================================================
EXT4-fs unmount: 64 callbacks suppressed
EXT4-fs (loop4): unmounting filesystem 00000000-0000-0000-0000-000000000000.
EXT4-fs (loop4): 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

syzbot

unread,
Feb 18, 2024, 6:01:16 PMFeb 18
to syzkaller-upst...@googlegroups.com
Auto-closing this bug as obsolete.
Crashes did not happen for a while, no reproducer and no activity.
Reply all
Reply to author
Forward
0 new messages