From: Pavel Begunkov <asml.silence@gmail.com>
To: syzbot <syzbot+5a486fef3de40e0d8c76@syzkaller.appspotmail.com>,
axboe@kernel.dk, io-uring@vger.kernel.org,
linux-kernel@vger.kernel.org, syzkaller-bugs@googlegroups.com
Subject: Re: [syzbot] [io-uring?] KCSAN: data-race in __se_sys_io_uring_register / io_sqe_files_register (3)
Date: Wed, 13 Nov 2024 11:42:48 +0000 [thread overview]
Message-ID: <03028b7f-95e8-4b9c-a52a-77b02f83fb21@gmail.com> (raw)
In-Reply-To: <673488a6.050a0220.2a2fcc.000a.GAE@google.com>
On 11/13/24 11:08, syzbot wrote:
> Hello,
>
> syzbot found the following issue on:
>
> HEAD commit: 2d5404caa8c7 Linux 6.12-rc7
> git tree: upstream
> console output: https://syzkaller.appspot.com/x/log.txt?x=10e838c0580000
> kernel config: https://syzkaller.appspot.com/x/.config?x=29fedde79f609854
> dashboard link: https://syzkaller.appspot.com/bug?extid=5a486fef3de40e0d8c76
> compiler: Debian clang version 15.0.6, GNU ld (GNU Binutils for Debian) 2.40
>
> Unfortunately, I don't have any reproducer for this issue yet.
>
> Downloadable assets:
> disk image: https://storage.googleapis.com/syzbot-assets/15a7713979b8/disk-2d5404ca.raw.xz
> vmlinux: https://storage.googleapis.com/syzbot-assets/b51c4f695d4a/vmlinux-2d5404ca.xz
> kernel image: https://storage.googleapis.com/syzbot-assets/e8c0f17bc00b/bzImage-2d5404ca.xz
>
> IMPORTANT: if you fix the issue, please add the following tag to the commit:
> Reported-by: syzbot+5a486fef3de40e0d8c76@syzkaller.appspotmail.com
>
> ==================================================================
> BUG: KCSAN: data-race in __se_sys_io_uring_register / io_sqe_files_register
>
> read-write to 0xffff8881021940b8 of 4 bytes by task 5923 on cpu 1:
> io_sqe_files_register+0x2c4/0x3b0 io_uring/rsrc.c:713
> __io_uring_register io_uring/register.c:403 [inline]
> __do_sys_io_uring_register io_uring/register.c:611 [inline]
> __se_sys_io_uring_register+0x8d0/0x1280 io_uring/register.c:591
> __x64_sys_io_uring_register+0x55/0x70 io_uring/register.c:591
> x64_sys_call+0x202/0x2d60 arch/x86/include/generated/asm/syscalls_64.h:428
> 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
>
> read to 0xffff8881021940b8 of 4 bytes by task 5924 on cpu 0:
> __do_sys_io_uring_register io_uring/register.c:613 [inline]
Seems to point to tracing:
mutex_lock(&ctx->uring_lock);
ret = __io_uring_register(ctx, opcode, arg, nr_args);
mutex_unlock(&ctx->uring_lock);
trace_io_uring_register(ctx, opcode, ctx->nr_user_files, ctx->nr_user_bufs, ret);
And thus we don't care much about it, but we can just move it
one line up under the lock.
--
Pavel Begunkov
prev parent reply other threads:[~2024-11-13 11:42 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-13 11:08 [syzbot] [io-uring?] KCSAN: data-race in __se_sys_io_uring_register / io_sqe_files_register (3) syzbot
2024-11-13 11:42 ` Pavel Begunkov [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=03028b7f-95e8-4b9c-a52a-77b02f83fb21@gmail.com \
--to=asml.silence@gmail.com \
--cc=axboe@kernel.dk \
--cc=io-uring@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=syzbot+5a486fef3de40e0d8c76@syzkaller.appspotmail.com \
--cc=syzkaller-bugs@googlegroups.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox