Re: Bug: slab-use-after-free Read in try_to_wake_up

From: Pavel Begunkov
Date: Thu Dec 26 2024 - 11:56:28 EST


On 12/26/24 03:43, Kun Hu wrote:
This is not caused by a locking bug. The freed structure is a task_struct which is passed by io_sq_thread() to try_to_wake_up(). So the culprit is probably in the io_uring code. cc'ing the io_uring developers for further review.

Thanks. This also seems to involve sqpoll.c and io_uring.c. I'm sending an email to both Pavel Begunkov and Jens Axboe, with a cc to io_uring.

Kun Hu, can you try out the patch I sent? It should likely be
it, but I couldn't reproduce without hand tailoring the kernel
code with sleeping and such.

--
Pavel Begunkov