Re: [PATCH] md/raid5: fix soft lockup in retry_aligned_read()

"Yu Kuai" <[email protected]>
Newsgroups gmane.linux.raid,gmane.linux.kernel,gmane.linux.kernel.stable
Message-ID <[email protected]>
在 2026/4/2 14:14, Chia-Ming Chang 写道:

> When retry_aligned_read() encounters an overlapped stripe, it releases
> the stripe via raid5_release_stripe() which puts it on the lockless
> released_stripes llist. In the next raid5d loop iteration,
> release_stripe_list() drains the stripe onto handle_list (since
> STRIPE_HANDLE is set by the original IO), but retry_aligned_read()
> runs before handle_active_stripes() and removes the stripe from
> handle_list via find_get_stripe() -> list_del_init(). This prevents
> handle_stripe() from ever processing the stripe to resolve the
> overlap, causing an infinite loop and soft lockup.
>
> Fix this by using __release_stripe() with temp_inactive_list instead
> of raid5_release_stripe() in the failure path, so the stripe does not
> go through the released_stripes llist. This allows raid5d to break out
> of its loop, and the overlap will be resolved when the stripe is
> eventually processed by handle_stripe().
>
> Fixes: 773ca82fa1ee ("raid5: make release_stripe lockless")
> Cc:[email protected]
> Signed-off-by: FengWei Shih<[email protected]>
> Signed-off-by: Chia-Ming Chang<[email protected]>
> ---
>   drivers/md/raid5.c | 8 +++++++-
>   1 file changed, 7 insertions(+), 1 deletion(-)
Applied to md-7.1

-- 
Thansk,
Kuai
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.