Re: [PATCH] md/raid1: free r1_bio when REQ_NOWAIT is set and read would block on retry

"yu kuai" <[email protected]>
Newsgroups gmane.linux.kernel,gmane.linux.raid
Message-ID <[email protected]>
在 2026/6/11 18:13, Abd-Alrhman Masalkhi 写道:

> When a read is retried, raid1_read_request() may be called with a
> pre-allocated r1_bio. If wait_read_barrier() fails for a REQ_NOWAIT
> read, the bio is completed and the function returns immediately. In this
> case the existing r1_bio is leaked.
>
> This fixes a leak of pre-allocated r1_bio structures for retried reads.
>
> Fixes: 5aa705039c4f ("md: raid1 add nowait support")
> Reported-by: sashiko-bot<[email protected]>
> Closes:https://sashiko.dev/#/patchset/[email protected]?part=1
> Signed-off-by: Abd-Alrhman Masalkhi<[email protected]>
> ---
>   drivers/md/raid1.c | 6 ++++++
>   1 file changed, 6 insertions(+)
Applied to md-7.2

-- 
Thanks,
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.