On 2026-10-22 12:56 -0700, Alison Schofield wrote:
> Cached mappings are not freed when a device is destroyed or invalidated
> when its ranges change. This leaks memory and can leave callers using
> obsolete physical address ranges, potentially operating on memory blocks
> that no longer belong to the device.
> 
> Free mappings on device destruction and invalidate the cache when device
> ranges may have changed.
> 
> Fixes: 5a31bf710399 ("libdaxctl: add mapping iterator APIs")
> Fixes: 52a2653098a5 ("libdaxctl: add daxctl_dev_set_mapping()")
> Signed-off-by: Alison Schofield <[email protected]>

Looks right to me.  I'm a little light on the lifetime details for
the cached mappings, but i couldn't find any obvious issues.

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

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

Reply via email to