io-uring.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jens Axboe <axboe@kernel.dk>
To: Pavel Begunkov <asml.silence@gmail.com>, io-uring@vger.kernel.org
Cc: Hao Sun <sunhao.th@gmail.com>
Subject: Re: [PATCH] io-wq: fix cancellation on create-worker failure
Date: Wed, 8 Sep 2021 06:34:34 -0600	[thread overview]
Message-ID: <8462bdb5-a323-2eb2-ef1c-4e10ac7876dc@kernel.dk> (raw)
In-Reply-To: <93b9de0fcf657affab0acfd675d4abcd273ee863.1631092071.git.asml.silence@gmail.com>

On 9/8/21 3:09 AM, Pavel Begunkov wrote:
> WARNING: CPU: 0 PID: 10392 at fs/io_uring.c:1151 req_ref_put_and_test
> fs/io_uring.c:1151 [inline]
> WARNING: CPU: 0 PID: 10392 at fs/io_uring.c:1151 req_ref_put_and_test
> fs/io_uring.c:1146 [inline]
> WARNING: CPU: 0 PID: 10392 at fs/io_uring.c:1151
> io_req_complete_post+0xf5b/0x1190 fs/io_uring.c:1794
> Modules linked in:
> Call Trace:
>  tctx_task_work+0x1e5/0x570 fs/io_uring.c:2158
>  task_work_run+0xe0/0x1a0 kernel/task_work.c:164
>  tracehook_notify_signal include/linux/tracehook.h:212 [inline]
>  handle_signal_work kernel/entry/common.c:146 [inline]
>  exit_to_user_mode_loop kernel/entry/common.c:172 [inline]
>  exit_to_user_mode_prepare+0x232/0x2a0 kernel/entry/common.c:209
>  __syscall_exit_to_user_mode_work kernel/entry/common.c:291 [inline]
>  syscall_exit_to_user_mode+0x19/0x60 kernel/entry/common.c:302
>  do_syscall_64+0x42/0xb0 arch/x86/entry/common.c:86
>  entry_SYSCALL_64_after_hwframe+0x44/0xae
> 
> When io_wqe_enqueue() -> io_wqe_create_worker() fails, we can't just
> call io_run_cancel() to clean up the request, it's already enqueued via
> io_wqe_insert_work() and will be executed either by some other worker
> during cancellation (e.g. in io_wq_put_and_exit()).

Oops yes, that looks better. Thanks, applied.

-- 
Jens Axboe


      reply	other threads:[~2021-09-08 12:34 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-08  9:09 [PATCH] io-wq: fix cancellation on create-worker failure Pavel Begunkov
2021-09-08 12:34 ` Jens Axboe [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=8462bdb5-a323-2eb2-ef1c-4e10ac7876dc@kernel.dk \
    --to=axboe@kernel.dk \
    --cc=asml.silence@gmail.com \
    --cc=io-uring@vger.kernel.org \
    --cc=sunhao.th@gmail.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).