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@xxxxxxxxx> > --- > fs/io_uring.c | 28 ++++++++++++++-------------- > 1 file changed, 14 insertions(+), 14 deletions(-) > Both backports now queued up, thanks. greg k-h