[moderation] [mm?] KCSAN: data-race in __lru_add_drain_all / folio_activate (6)

0 views
Skip to first unread message

syzbot

unread,
Jul 9, 2024, 11:34:23 AMJul 9
to syzkaller-upst...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: 4376e966ecb7 Merge tag 'perf-tools-fixes-for-v6.10-2024-07..
git tree: upstream
console output: https://syzkaller.appspot.com/x/log.txt?x=1188d376980000
kernel config: https://syzkaller.appspot.com/x/.config?x=d41a21b8562873d8
dashboard link: https://syzkaller.appspot.com/bug?extid=fd28149a73d268a39f45
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/eb0bb59193b7/disk-4376e966.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/da231f9e7cb6/vmlinux-4376e966.xz
kernel image: https://storage.googleapis.com/syzbot-assets/1ae7e4c1c675/bzImage-4376e966.xz

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

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

read-write to 0xffff888237c2b008 of 1 bytes by task 9051 on cpu 0:
folio_batch_add include/linux/pagevec.h:77 [inline]
folio_batch_add_and_move mm/swap.c:233 [inline]
folio_activate+0xb7/0x1c0 mm/swap.c:363
folio_mark_accessed+0x11d/0x190 mm/swap.c:486
zap_present_folio_ptes mm/memory.c:1490 [inline]
zap_present_ptes mm/memory.c:1564 [inline]
zap_pte_range mm/memory.c:1606 [inline]
zap_pmd_range mm/memory.c:1724 [inline]
zap_pud_range mm/memory.c:1753 [inline]
zap_p4d_range mm/memory.c:1774 [inline]
unmap_page_range+0xecc/0x21f0 mm/memory.c:1795
unmap_single_vma+0x142/0x1d0 mm/memory.c:1841
unmap_vmas+0x18d/0x2b0 mm/memory.c:1885
exit_mmap+0x18f/0x710 mm/mmap.c:3341
__mmput+0x28/0x1c0 kernel/fork.c:1346
mmput+0x4c/0x60 kernel/fork.c:1368
exit_mm+0xe4/0x190 kernel/exit.c:567
do_exit+0x556/0x1710 kernel/exit.c:863
do_group_exit+0x102/0x150 kernel/exit.c:1025
get_signal+0xf2f/0x1080 kernel/signal.c:2909
arch_do_signal_or_restart+0x95/0x4b0 arch/x86/kernel/signal.c:310
exit_to_user_mode_loop kernel/entry/common.c:111 [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+0x59/0x130 kernel/entry/common.c:218
do_syscall_64+0xd6/0x1c0 arch/x86/entry/common.c:89
entry_SYSCALL_64_after_hwframe+0x77/0x7f

read to 0xffff888237c2b008 of 1 bytes by task 9065 on cpu 1:
folio_batch_count include/linux/pagevec.h:56 [inline]
cpu_needs_drain mm/swap.c:805 [inline]
__lru_add_drain_all+0x212/0x410 mm/swap.c:894
lru_add_drain_all+0x10/0x20 mm/swap.c:910
invalidate_bdev+0x47/0x70 block/bdev.c:100
invalidate_disk+0x29/0x70 block/genhd.c:745
__loop_clr_fd+0x191/0x3f0 drivers/block/loop.c:1183
loop_clr_fd drivers/block/loop.c:1276 [inline]
lo_ioctl+0xea6/0x1330 drivers/block/loop.c:1578
blkdev_ioctl+0x35f/0x450 block/ioctl.c:676
vfs_ioctl fs/ioctl.c:51 [inline]
__do_sys_ioctl fs/ioctl.c:907 [inline]
__se_sys_ioctl+0xd3/0x150 fs/ioctl.c:893
__x64_sys_ioctl+0x43/0x50 fs/ioctl.c:893
x64_sys_call+0x1581/0x2d70 arch/x86/include/generated/asm/syscalls_64.h:17
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

value changed: 0x06 -> 0x08

Reported by Kernel Concurrency Sanitizer on:
CPU: 1 PID: 9065 Comm: syz.3.1858 Tainted: G W 6.10.0-rc7-syzkaller-00003-g4376e966ecb7 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 06/07/2024
==================================================================
xt_CT: You must specify a L4 protocol and not use inversions on it


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