diff options
| author | Pavel Begunkov <asml.silence@gmail.com> | 2022-06-09 08:34:35 +0100 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2022-07-02 16:41:18 +0200 |
| commit | ea512d540a55a75058ee4b78abfd1d499b229d1d (patch) | |
| tree | f91bb3ca9ceaae0efa7ce2ec0c25f8466aa6605c /Makefile | |
| parent | 5696f7983d5d0dc070b4c0c07969d528aa553827 (diff) | |
| download | linux-ea512d540a55a75058ee4b78abfd1d499b229d1d.tar.gz linux-ea512d540a55a75058ee4b78abfd1d499b229d1d.tar.bz2 linux-ea512d540a55a75058ee4b78abfd1d499b229d1d.zip | |
io_uring: fix not locked access to fixed buf table
commit 05b538c1765f8d14a71ccf5f85258dcbeaf189f7 upstream.
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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'Makefile')
0 files changed, 0 insertions, 0 deletions
