linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: syzbot <syzbot+73554e2258b7b8bf0bbf@syzkaller.appspotmail.com>
To: asml.silence@gmail.com, axboe@kernel.dk,
	io-uring@vger.kernel.org, linux-kernel@vger.kernel.org,
	syzkaller-bugs@googlegroups.com
Subject: [syzbot] KCSAN: data-race in __io_uring_cancel / io_uring_try_cancel_requests
Date: Wed, 26 May 2021 08:44:18 -0700	[thread overview]
Message-ID: <000000000000fa9f7005c33d83b9@google.com> (raw)

Hello,

syzbot found the following issue on:

HEAD commit:    a050a6d2 Merge tag 'perf-tools-fixes-for-v5.13-2021-05-24'..
git tree:       upstream
console output: https://syzkaller.appspot.com/x/log.txt?x=13205087d00000
kernel config:  https://syzkaller.appspot.com/x/.config?x=3bcc8a6b51ef8094
dashboard link: https://syzkaller.appspot.com/bug?extid=73554e2258b7b8bf0bbf
compiler:       Debian clang version 11.0.1-2

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+73554e2258b7b8bf0bbf@syzkaller.appspotmail.com

==================================================================
BUG: KCSAN: data-race in __io_uring_cancel / io_uring_try_cancel_requests

write to 0xffff88811d8df330 of 8 bytes by task 3709 on cpu 1:
 io_uring_clean_tctx fs/io_uring.c:9042 [inline]
 __io_uring_cancel+0x261/0x3b0 fs/io_uring.c:9136
 io_uring_files_cancel include/linux/io_uring.h:16 [inline]
 do_exit+0x185/0x1560 kernel/exit.c:781
 do_group_exit+0xce/0x1a0 kernel/exit.c:923
 get_signal+0xfc3/0x1610 kernel/signal.c:2835
 arch_do_signal_or_restart+0x2a/0x220 arch/x86/kernel/signal.c:789
 handle_signal_work kernel/entry/common.c:147 [inline]
 exit_to_user_mode_loop kernel/entry/common.c:171 [inline]
 exit_to_user_mode_prepare+0x109/0x190 kernel/entry/common.c:208
 __syscall_exit_to_user_mode_work kernel/entry/common.c:290 [inline]
 syscall_exit_to_user_mode+0x20/0x40 kernel/entry/common.c:301
 do_syscall_64+0x56/0x90 arch/x86/entry/common.c:57
 entry_SYSCALL_64_after_hwframe+0x44/0xae

read to 0xffff88811d8df330 of 8 bytes by task 6412 on cpu 0:
 io_uring_try_cancel_iowq fs/io_uring.c:8911 [inline]
 io_uring_try_cancel_requests+0x1ce/0x8e0 fs/io_uring.c:8933
 io_ring_exit_work+0x7c/0x1110 fs/io_uring.c:8736
 process_one_work+0x3e9/0x8f0 kernel/workqueue.c:2276
 worker_thread+0x636/0xae0 kernel/workqueue.c:2422
 kthread+0x1d0/0x1f0 kernel/kthread.c:313
 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:294

Reported by Kernel Concurrency Sanitizer on:
CPU: 0 PID: 6412 Comm: kworker/u4:9 Not tainted 5.13.0-rc3-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
Workqueue: events_unbound io_ring_exit_work
==================================================================


---
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 syzkaller@googlegroups.com.

syzbot will keep track of this issue. See:
https://goo.gl/tpsmEJ#status for how to communicate with syzbot.

             reply	other threads:[~2021-05-26 15:44 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-26 15:44 syzbot [this message]
2021-05-26 15:48 ` [syzbot] KCSAN: data-race in __io_uring_cancel / io_uring_try_cancel_requests Marco Elver
2021-05-26 15:52   ` Marco Elver
2021-05-26 16:29     ` Pavel Begunkov
2021-05-26 16:33       ` Pavel Begunkov
2021-05-26 16:36       ` Marco Elver
2021-05-26 20:31         ` Pavel Begunkov
2021-05-27  9:32           ` Marco Elver
2021-05-27 10:05             ` Pavel Begunkov

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=000000000000fa9f7005c33d83b9@google.com \
    --to=syzbot+73554e2258b7b8bf0bbf@syzkaller.appspotmail.com \
    --cc=asml.silence@gmail.com \
    --cc=axboe@kernel.dk \
    --cc=io-uring@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --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;
as well as URLs for NNTP newsgroup(s).