public inbox for stable@vger.kernel.org
 help / color / mirror / Atom feed
From: Greg KH <gregkh@linuxfoundation.org>
To: Pavel Begunkov <asml.silence@gmail.com>
Cc: stable@vger.kernel.org, Jens Axboe <axboe@kernel.dk>
Subject: Re: [PATCH stable-5.15] io_uring: fix not locked access to fixed buf table
Date: Thu, 30 Jun 2022 15:23:58 +0200	[thread overview]
Message-ID: <Yr2j7rMISraubCIK@kroah.com> (raw)
In-Reply-To: <38d217692f3247110ce26e60b01f4eadd866757b.1656541986.git.asml.silence@gmail.com>

On Wed, Jun 29, 2022 at 11:33:36PM +0100, Pavel Begunkov wrote:
> [ upstream commit 05b538c1765f8d14a71ccf5f85258dcbeaf189f7 ]
> 
> We can look inside the fixed buffer table only while holding
> ->uring_lock, however in some cases we don't do the right async prep for
> IORING_OP_{WRITE,READ}_FIXED ending up with NULL req->imu forcing making
> an io-wq worker to try to resolve the fixed buffer without proper
> locking.
> 
> Move req->imu setup into early req init paths, i.e. io_prep_rw(), which
> is called unconditionally for rw requests and under uring_lock.
> 
> Fixes: 634d00df5e1cf ("io_uring: add full-fledged dynamic buffers support")
> Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
> ---
>  fs/io_uring.c | 28 ++++++++++++++--------------
>  1 file changed, 14 insertions(+), 14 deletions(-)
> 

Both backports now queued up, thanks.

greg k-h

      reply	other threads:[~2022-06-30 13:24 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-29 22:33 [PATCH stable-5.15] io_uring: fix not locked access to fixed buf table Pavel Begunkov
2022-06-30 13:23 ` Greg KH [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=Yr2j7rMISraubCIK@kroah.com \
    --to=gregkh@linuxfoundation.org \
    --cc=asml.silence@gmail.com \
    --cc=axboe@kernel.dk \
    --cc=stable@vger.kernel.org \
    /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