Re: [PATCH v3 REPOST] block: serialize elevator changes for the same queue using a writer lock
Jens Axboe <[email protected]>
| Newsgroups | org.kernel.vger.linux-block |
|---|---|
| Message-ID | <178420392608.282740.8247081669734891037.b4-ty@b4> |
On Thu, 16 Jul 2026 18:22:37 +0900, Shin'ichiro Kawasaki wrote:
> When elevator_change() is called concurrently for the same queue, the
> elevator_change_done() function runs concurrently as well. This function
> adds or deletes kobjects for the debugfs entry of the queue. Then the
> concurrent calls cause memory corruption of the kobjects and result in a
> process hang. The core part of the elevator switch is protected by queue
> freeze and q->elevator_lock. However, since the commit 559dc11143eb
> ("block: move elv_register[unregister]_queue out of elevator_lock"), the
> elevator_change_done() is not serialized. Hence the memory corruption
> and the hang.
>
> [...]
Applied, thanks!
[1/1] block: serialize elevator changes for the same queue using a writer lock
commit: 4ff58d6bc9dd4c7fe6092d0ab5677a79ebc788af
Best regards,
--
Jens Axboe