public inbox for [email protected]
 help / color / mirror / Atom feed
From: Jens Axboe <[email protected]>
To: Pavel Begunkov <[email protected]>, [email protected]
Cc: [email protected]
Subject: Re: [PATCH 5.12] io_uring: handle setup-failed ctx in kill_timeouts
Date: Mon, 29 Mar 2021 06:49:14 -0600	[thread overview]
Message-ID: <[email protected]> (raw)
In-Reply-To: <660261a48f0e7abf260c8e43c87edab3c16736fa.1617014345.git.asml.silence@gmail.com>

On 3/29/21 4:39 AM, Pavel Begunkov wrote:
> general protection fault, probably for non-canonical address
> 	0xdffffc0000000018: 0000 [#1] KASAN: null-ptr-deref
> 	in range [0x00000000000000c0-0x00000000000000c7]
> RIP: 0010:io_commit_cqring+0x37f/0xc10 fs/io_uring.c:1318
> Call Trace:
>  io_kill_timeouts+0x2b5/0x320 fs/io_uring.c:8606
>  io_ring_ctx_wait_and_kill+0x1da/0x400 fs/io_uring.c:8629
>  io_uring_create fs/io_uring.c:9572 [inline]
>  io_uring_setup+0x10da/0x2ae0 fs/io_uring.c:9599
>  do_syscall_64+0x2d/0x70 arch/x86/entry/common.c:46
>  entry_SYSCALL_64_after_hwframe+0x44/0xae
> 
> It can get into wait_and_kill() before setting up ctx->rings, and hence
> io_commit_cqring() fails. Mimic poll cancel and do it only when we
> completed events, there can't be any requests if it failed before
> initialising rings.

Thanks, applied.

-- 
Jens Axboe


      reply	other threads:[~2021-03-29 12:49 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-29 10:39 [PATCH 5.12] io_uring: handle setup-failed ctx in kill_timeouts Pavel Begunkov
2021-03-29 12:49 ` 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 \
    [email protected] \
    [email protected] \
    [email protected] \
    [email protected] \
    [email protected] \
    /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