Re: [PATCH] io_uring/sqpoll: don't set IO_SQ_THREAD_SHOULD_STOP on thread exit

From: Jens Axboe

Date: Tue Nov 03 2026 - 09:26:00 EST


On 11/3/26 6:09 AM, Breno Leitao wrote:
> On Mon, Nov 02, 2026 at 04:05:42PM +0800, Shuai Liu wrote:
>> WARNING: io_uring/sqpoll.c:88 at io_sq_thread_stop
>> Workqueue: iou_exit io_ring_exit_work
>> Call Trace:
>> io_put_sq_data
>> io_sq_thread_finish
>> io_ring_ctx_free
>> io_ring_exit_work
>
> I've started seeing this issue on my debug kernels.
>
> Not sure if this is the right approach to fix it, but, I've tested this
> patch, and the warning went away.
>
> Jens, feel free to add my `Tested-by: Breno Leitao <leitao@xxxxxxxxxx>'
> if you decide to get this patch in.

Thanks for testing - I'll get this queued up, but heads-up to the
original submitter, I'm going to trim the comment. LLM's love
their lengthy comments...

--
Jens Axboe