> From: Guopeng Zhang <[email protected]>
> 
> get_cg_pool_unlocked() handles allocation failures under dmemcg_lock by
> dropping the lock, preallocating a pool with GFP_KERNEL, and retrying the
> locked lookup and creation path.
> 
> If the fallback allocation fails too, pool remains NULL. Since the loop
> condition is while (!pool), the function can keep retrying instead of
> propagating the allocation failure to the caller.
> 
> Set pool to ERR_PTR(-ENOMEM) when the fallback allocation fails so the
> loop exits through the existing common return path. The callers already
> handle ERR_PTR() from get_cg_pool_unlocked(), so this restores the
> expected error path.
> 
> Fixes: b168ed458dde ("kernel/cgroup: Add "dmem" memory accounting cgroup")
> Cc: [email protected] # v6.14+
> Signed-off-by: Guopeng Zhang <[email protected]>
> Signed-off-by: Tejun Heo <[email protected]>
> (cherry picked from commit 796ad622040f7f955ccc3973085e953415920496)
> 
> https://virtuozzo.atlassian.net/browse/VSTOR-152813
> Signed-off-by: Mirian Shilakadze <[email protected]>

Sashiko has reviewed this patch and found no issues. It looks great!

-- 
Sashiko AI review ยท 
https://sashiko.vzint.dev/#/patchset/[email protected]?part=4


_______________________________________________
Devel mailing list
[email protected]
https://lists.openvz.org/mailman/listinfo/devel

Reply via email to