Re: [PATCH] memcg: fix slab accounting in refill_obj_stock() trylock path
From: Johannes Weiner
Date: Fri Feb 27 2026 - 07:51:49 EST
On Thu, Feb 26, 2026 at 07:51:37PM +0800, Hao Li wrote:
> In the trylock path of refill_obj_stock(), mod_objcg_mlstate() should
> use the real alloc/free bytes (i.e., nr_acct) for accounting, rather
> than nr_bytes.
>
> Fixes: 200577f69f29 ("memcg: objcg stock trylock without irq disabling")
> Cc: stable@xxxxxxxxxxxxxxx
> Signed-off-by: Hao Li <hao.li@xxxxxxxxx>
Oops. Yes, I suppose the contended case is quite rare (this is CPU
local), so I'm not surprised this went unnoticed for so long.
Acked-by: Johannes Weiner <hannes@xxxxxxxxxxx>