On 2026-10-22 12:56 -0700, Alison Schofield wrote:
> A failed sysfs read can silently truncate a device's mapping list, leaving
> callers with incomplete range information and potentially incorrect memory
> block accounting. An allocation failure also causes an infinite loop,
> hanging the caller.
> 
> Distinguish the end of the mapping list from read failures, reject
> incomplete lists, and discard partial results on error. The mappings
> describe the device's constituent ranges, so validate that their combined
> size matches the device size. Return -ENOMEM on allocation failure.
> 
> Fixes: 5a31bf710399 ("libdaxctl: add mapping iterator APIs")
> Signed-off-by: Alison Schofield <[email protected]>

Nothing stands out to me, this lgtm. Did a bit of testing as well.

Reviewed-by: Gregory Price (Meta) <[email protected]>
Tested-by: Gregory Price (Meta) <[email protected]>

-- 
Gregory Price (Meta) <[email protected]>

Reply via email to