KCSAN: data-race in shmem_add_to_page_cache / shmem_getpage_gfp (2)

4 views
Skip to first unread message

syzbot

unread,
Nov 18, 2021, 7:56:24 AM11/18/21
to syzkaller-upst...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: 8ab774587903 Merge tag 'trace-v5.16-5' of git://git.kernel..
git tree: upstream
console output: https://syzkaller.appspot.com/x/log.txt?x=10c795e6b00000
kernel config: https://syzkaller.appspot.com/x/.config?x=a70237460d215073
dashboard link: https://syzkaller.appspot.com/bug?extid=ca1a39cda7547e0dce74
compiler: Debian clang version 11.0.1-2, GNU ld (GNU Binutils for Debian) 2.35.2
CC: [ak...@linux-foundation.org hu...@google.com linux-...@vger.kernel.org linu...@kvack.org]

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

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

==================================================================
BUG: KCSAN: data-race in shmem_add_to_page_cache / shmem_getpage_gfp

write to 0xffff88814c913260 of 8 bytes by task 12476 on cpu 1:
shmem_add_to_page_cache+0x55d/0x670 mm/shmem.c:742
shmem_getpage_gfp+0xaf1/0x12c0 mm/shmem.c:1936
shmem_fault+0xd1/0x3c0 mm/shmem.c:2114
__do_fault mm/memory.c:3849 [inline]
do_read_fault mm/memory.c:4164 [inline]
do_fault mm/memory.c:4293 [inline]
handle_pte_fault mm/memory.c:4551 [inline]
__handle_mm_fault mm/memory.c:4686 [inline]
handle_mm_fault+0xba6/0x1590 mm/memory.c:4784
do_user_addr_fault+0x609/0xbe0 arch/x86/mm/fault.c:1397
handle_page_fault arch/x86/mm/fault.c:1485 [inline]
exc_page_fault+0x91/0x290 arch/x86/mm/fault.c:1541
asm_exc_page_fault+0x1e/0x30
copy_user_enhanced_fast_string+0xe/0x30
copy_user_generic arch/x86/include/asm/uaccess_64.h:37 [inline]
raw_copy_from_user arch/x86/include/asm/uaccess_64.h:52 [inline]
copyin lib/iov_iter.c:168 [inline]
_copy_from_iter+0x1ac/0x990 lib/iov_iter.c:767
copy_from_iter include/linux/uio.h:164 [inline]
copy_from_iter_full include/linux/uio.h:170 [inline]
sctp_user_addto_chunk+0x67/0x130 net/sctp/sm_make_chunk.c:1565
sctp_datamsg_from_user+0x59d/0x9c0 net/sctp/chunk.c:269
sctp_sendmsg_to_asoc+0x504/0xc00 net/sctp/socket.c:1855
sctp_sendmsg+0x1296/0x1ad0 net/sctp/socket.c:2027
inet_sendmsg+0x5f/0x80 net/ipv4/af_inet.c:819
sock_sendmsg_nosec net/socket.c:704 [inline]
sock_sendmsg net/socket.c:724 [inline]
__sys_sendto+0x21e/0x2c0 net/socket.c:2036
__do_sys_sendto net/socket.c:2048 [inline]
__se_sys_sendto net/socket.c:2044 [inline]
__x64_sys_sendto+0x74/0x90 net/socket.c:2044
do_syscall_x64 arch/x86/entry/common.c:50 [inline]
do_syscall_64+0x44/0xd0 arch/x86/entry/common.c:80
entry_SYSCALL_64_after_hwframe+0x44/0xae

read to 0xffff88814c913260 of 8 bytes by task 12488 on cpu 0:
shmem_recalc_inode mm/shmem.c:363 [inline]
shmem_getpage_gfp+0xf23/0x12c0 mm/shmem.c:1946
shmem_fault+0xd1/0x3c0 mm/shmem.c:2114
__do_fault mm/memory.c:3849 [inline]
do_read_fault mm/memory.c:4164 [inline]
do_fault mm/memory.c:4293 [inline]
handle_pte_fault mm/memory.c:4551 [inline]
__handle_mm_fault mm/memory.c:4686 [inline]
handle_mm_fault+0xba6/0x1590 mm/memory.c:4784
faultin_page mm/gup.c:939 [inline]
__get_user_pages+0x388/0xc80 mm/gup.c:1160
populate_vma_page_range mm/gup.c:1492 [inline]
__mm_populate+0x24d/0x370 mm/gup.c:1601
mm_populate include/linux/mm.h:2734 [inline]
vm_mmap_pgoff+0x160/0x1f0 mm/util.c:524
ksys_mmap_pgoff+0xc2/0x320 mm/mmap.c:1623
do_syscall_x64 arch/x86/entry/common.c:50 [inline]
do_syscall_64+0x44/0xd0 arch/x86/entry/common.c:80
entry_SYSCALL_64_after_hwframe+0x44/0xae

value changed: 0x0000000000000329 -> 0x000000000000032a

Reported by Kernel Concurrency Sanitizer on:
CPU: 0 PID: 12488 Comm: syz-executor.3 Not tainted 5.16.0-rc1-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
==================================================================


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

syzbot

unread,
Nov 11, 2022, 8:34:33 AM11/11/22
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