Re: [PATCH v5 1/1] cxl/pmem: debug invalid serial number data
From: Jonathan Cameron
Date: Thu Feb 20 2025 - 12:31:26 EST
On Wed, 19 Feb 2025 12:00:29 +0800
Yuquan Wang <wangyuquan1236@xxxxxxxxxxxxxx> wrote:
> In a nvdimm interleave-set each device with an invalid or zero
> serial number may cause pmem region initialization to fail, but in
> cxl case such device could still set cookies of nd_interleave_set
> and create a nvdimm pmem region.
>
> This adds the validation of serial number in cxl pmem region creation.
> The event of no serial number would cause to fail to set the cookie
> and pmem region.
>
> For cxl-test to work properly, always +1 on mock device's serial
> number.
>
> Signed-off-by: Yuquan Wang <wangyuquan1236@xxxxxxxxxxxxxx>
Reviewed-by: Jonathan Cameron <Jonathan.Cameron@xxxxxxxxxx>