Re: [PATCH v7 5/7] cxl/memdev: Don't overwrite the error from an earlier partition poison query

From: Jonathan Cameron

Date: Tue Sep 15 2026 - 22:44:51 EST


On Wed, 2 Sep 2026 13:38:37 +0800
Richard Cheng <icheng@xxxxxxxxxx> wrote:

> cxl_get_poison_by_memdev() queries Get Poison List per partition but
> never checks the result inside the loop, so a later partition's success
> overwrites an earlier partition's failure and the whole scan reports
> success while that partition's poison went unlisted. Before the loop
> conversion the PMEM query returned early on error. Stop the loop on any
> error not already tolerated as a RAM -EFAULT.
>
> Fixes: be5cbd084027 ("cxl: Kill enum cxl_decoder_mode")
> Reviewed-by: Dave Jiang <dave.jiang@xxxxxxxxx>
> Closes: https://sashiko.dev/#/patchset/20260708074228.43654-1-icheng@xxxxxxxxxx?part=5
> Signed-off-by: Richard Cheng <icheng@xxxxxxxxxx>
Reviewed-by: Jonathan Cameron <jonathan.cameron@xxxxxxxxxxxxxxxx>

Given Alison's comments, lets get this in. Can revist later in the
world where we all have lots of spare time.

Jonathan