[moderation] [fs?] [mm?] KCSAN: data-race in ondemand_readahead / ondemand_readahead (10)

3 views
Skip to first unread message

syzbot

unread,
Dec 7, 2023, 7:08:30 PM12/7/23
to syzkaller-upst...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: bee0e7762ad2 Merge tag 'for-linus-iommufd' of git://git.ke..
git tree: upstream
console output: https://syzkaller.appspot.com/x/log.txt?x=10ab1ca2e80000
kernel config: https://syzkaller.appspot.com/x/.config?x=ac34c1f29a8029df
dashboard link: https://syzkaller.appspot.com/bug?extid=abc81f1acf3ae0281d2e
compiler: Debian clang version 15.0.6, GNU ld (GNU Binutils for Debian) 2.40
CC: [ak...@linux-foundation.org linux-...@vger.kernel.org linux-...@vger.kernel.org linu...@kvack.org wi...@infradead.org]

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

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/233be5f65dd2/disk-bee0e776.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/94423738a289/vmlinux-bee0e776.xz
kernel image: https://storage.googleapis.com/syzbot-assets/0b977463fa9a/bzImage-bee0e776.xz

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

==================================================================
BUG: KCSAN: data-race in ondemand_readahead / ondemand_readahead

read to 0xffff88816b197b78 of 8 bytes by task 26923 on cpu 0:
ondemand_readahead+0x13a/0x690 mm/readahead.c:580
page_cache_async_ra+0x94/0xa0 mm/readahead.c:717
do_async_mmap_readahead mm/filemap.c:3169 [inline]
filemap_fault+0x3da/0xc30 mm/filemap.c:3223
__do_fault mm/memory.c:4265 [inline]
do_read_fault mm/memory.c:4628 [inline]
do_fault mm/memory.c:4762 [inline]
do_pte_missing mm/memory.c:3730 [inline]
handle_pte_fault mm/memory.c:5038 [inline]
__handle_mm_fault mm/memory.c:5179 [inline]
handle_mm_fault+0x13bd/0x2dd0 mm/memory.c:5344
do_user_addr_fault arch/x86/mm/fault.c:1413 [inline]
handle_page_fault arch/x86/mm/fault.c:1505 [inline]
exc_page_fault+0x2f7/0x6c0 arch/x86/mm/fault.c:1561
asm_exc_page_fault+0x26/0x30 arch/x86/include/asm/idtentry.h:570
fault_in_readable+0xf8/0x1b0
fault_in_iov_iter_readable+0x152/0x190 lib/iov_iter.c:94
generic_perform_write+0x106/0x410 mm/filemap.c:3908
ext4_buffered_write_iter+0x1f6/0x370 fs/ext4/file.c:299
ext4_file_write_iter+0x297/0xe10
call_write_iter include/linux/fs.h:2020 [inline]
new_sync_write fs/read_write.c:491 [inline]
vfs_write+0x48a/0x790 fs/read_write.c:584
ksys_write+0xeb/0x1a0 fs/read_write.c:637
__do_sys_write fs/read_write.c:649 [inline]
__se_sys_write fs/read_write.c:646 [inline]
__x64_sys_write+0x42/0x50 fs/read_write.c:646
do_syscall_x64 arch/x86/entry/common.c:51 [inline]
do_syscall_64+0x44/0x110 arch/x86/entry/common.c:82
entry_SYSCALL_64_after_hwframe+0x63/0x6b

write to 0xffff88816b197b78 of 8 bytes by task 26922 on cpu 1:
ondemand_readahead+0x566/0x690 mm/readahead.c:606
page_cache_async_ra+0x94/0xa0 mm/readahead.c:717
do_async_mmap_readahead mm/filemap.c:3169 [inline]
filemap_fault+0x3da/0xc30 mm/filemap.c:3223
__do_fault mm/memory.c:4265 [inline]
do_read_fault mm/memory.c:4628 [inline]
do_fault mm/memory.c:4762 [inline]
do_pte_missing mm/memory.c:3730 [inline]
handle_pte_fault mm/memory.c:5038 [inline]
__handle_mm_fault mm/memory.c:5179 [inline]
handle_mm_fault+0x13bd/0x2dd0 mm/memory.c:5344
do_user_addr_fault arch/x86/mm/fault.c:1413 [inline]
handle_page_fault arch/x86/mm/fault.c:1505 [inline]
exc_page_fault+0x2f7/0x6c0 arch/x86/mm/fault.c:1561
asm_exc_page_fault+0x26/0x30 arch/x86/include/asm/idtentry.h:570
rep_movs_alternative+0x30/0x70 arch/x86/lib/copy_user_64.S:50
copy_user_generic arch/x86/include/asm/uaccess_64.h:112 [inline]
raw_copy_from_user arch/x86/include/asm/uaccess_64.h:127 [inline]
_copy_from_user+0x80/0xd0 lib/usercopy.c:23
copy_from_user include/linux/uaccess.h:183 [inline]
copy_msghdr_from_user+0x54/0x2a0 net/socket.c:2514
recvmsg_copy_msghdr net/socket.c:2769 [inline]
___sys_recvmsg net/socket.c:2841 [inline]
do_recvmmsg+0x290/0x720 net/socket.c:2939
__sys_recvmmsg net/socket.c:3018 [inline]
__do_sys_recvmmsg net/socket.c:3041 [inline]
__se_sys_recvmmsg net/socket.c:3034 [inline]
__x64_sys_recvmmsg+0xe2/0x160 net/socket.c:3034
do_syscall_x64 arch/x86/entry/common.c:51 [inline]
do_syscall_64+0x44/0x110 arch/x86/entry/common.c:82
entry_SYSCALL_64_after_hwframe+0x63/0x6b

value changed: 0x000000000000006f -> 0x0000000000000070

Reported by Kernel Concurrency Sanitizer on:
CPU: 1 PID: 26922 Comm: syz-executor.4 Tainted: G W 6.7.0-rc4-syzkaller-00009-gbee0e7762ad2 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 11/10/2023
==================================================================


---
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,
Apr 10, 2024, 9:33:13 PMApr 10
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