From: "Yu Kuai" <yukuai@fnnas.com>
To: "Chia-Ming Chang" <chiamingc@synology.com>, <song@kernel.org>
Cc: <linan122@huawei.com>, <shli@kernel.org>, <neil@brown.name>,
<linux-raid@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
<stable@vger.kernel.org>,
"FengWei Shih" <dannyshih@synology.com>, <yukuai@fnnas.com>
Subject: Re: [PATCH] md/raid5: fix soft lockup in retry_aligned_read()
Date: Tue, 7 Apr 2026 21:39:55 +0800 [thread overview]
Message-ID: <ede626d0-6e0a-43bf-8aa6-eba6f6dcd1fd@fnnas.com> (raw)
In-Reply-To: <20260402061406.455755-1-chiamingc@synology.com>
在 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:stable@vger.kernel.org
> Signed-off-by: FengWei Shih<dannyshih@synology.com>
> Signed-off-by: Chia-Ming Chang<chiamingc@synology.com>
> ---
> drivers/md/raid5.c | 8 +++++++-
> 1 file changed, 7 insertions(+), 1 deletion(-)
Applied to md-7.1
--
Thansk,
Kuai
prev parent reply other threads:[~2026-04-07 13:40 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-02 6:14 [PATCH] md/raid5: fix soft lockup in retry_aligned_read() Chia-Ming Chang
2026-04-07 13:39 ` Yu Kuai [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ede626d0-6e0a-43bf-8aa6-eba6f6dcd1fd@fnnas.com \
--to=yukuai@fnnas.com \
--cc=chiamingc@synology.com \
--cc=dannyshih@synology.com \
--cc=linan122@huawei.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-raid@vger.kernel.org \
--cc=neil@brown.name \
--cc=shli@kernel.org \
--cc=song@kernel.org \
--cc=stable@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox