Re: [PATCH v4 1/7] md/raid10: fix r10bio leak in raid10_write_request() error paths

From: yu kuai

Date: Wed Jul 15 2026 - 03:36:31 EST


在 2026/7/10 18:15, Abd-Alrhman Masalkhi 写道:

> When raid10_write_request() fails because REQ_NOWAIT is set, the
> allocated r10_bio is not freed before returning, resulting in a memory
> leak. Free r10_bio before returning from the REQ_NOWAIT error paths.
>
> Fixes: c9aa889b035f ("md: raid10 add nowait support")
> Reported-by: sashiko-bot<sashiko-bot@xxxxxxxxxx>
> Closes:https://lore.kernel.org/linux-raid/20260613184042.BCEC01F000E9@xxxxxxxxxxxxxxx/
> Signed-off-by: Abd-Alrhman Masalkhi<abd.masalkhi@xxxxxxxxx>
Reviewed-by: Yu Kuai <yukuai@xxxxxxx>

--
Thanks,
Kuai