On Wed, Jan 26, 2022 at 06:41:00PM +0000, Pavel Begunkov wrote: > [ upstream commit 3cc7fdb9f90a25ae92250bf9e6cf3b9556b230e9 ] > > tctx_task_work() may get run after io_uring cancellation and so there > will be no one to put cached in tctx task refs that may have been added > back by tw handlers using inline completion infra, Call > io_uring_drop_tctx_refs() at the end of the main tw handler to release > them. > > Cc: stable@xxxxxxxxxxxxxxx # 5.15+ > Reported-by: Lukas Bulwahn <lukas.bulwahn@xxxxxxxxx> > Fixes: e98e49b2bbf7 ("io_uring: extend task put optimisations") > Signed-off-by: Pavel Begunkov <asml.silence@xxxxxxxxx> > Link: https://lore.kernel.org/r/69f226b35fbdb996ab799a8bbc1c06bf634ccec1.1641688805.git.asml.silence@xxxxxxxxx > Signed-off-by: Jens Axboe <axboe@xxxxxxxxx> > --- > fs/io_uring.c | 34 +++++++++++++++++++++------------- > 1 file changed, 21 insertions(+), 13 deletions(-) > Both backports now queued up, thanks. greg k-h