Re: [PATCH slab/for-next v2 05/14] net: skbuff: specify SLAB_MAY_ACCOUNT for skbuff_head_cache

From: Hao Li

Date: Thu Dec 03 2026 - 09:50:21 EST


On Wed, Nov 25, 2026 at 09:37:06PM +0000, Harry Yoo (Meta) wrote:
> AF_UNIX sets sk->sk_allocation to GFP_KERNEL_ACCOUNT, so skbs can be
> allocated from skbuff_head_cache with __GFP_ACCOUNT. Specify
> SLAB_MAY_ACCOUNT when the object may be charged to a memcg.
> __GFP_ACCOUNT without SLAB_MAY_ACCOUNT will not be allowed.
>
> Path: unix_dgram_sendmsg() -> sock_alloc_send_pskb(sk->sk_allocation)
> -> alloc_skb_with_frags() -> __alloc_skb()
> -> kmem_cache_alloc_node(skbuff_head_cache)
>
> Cc: "David S. Miller" <davem@xxxxxxxxxxxxx>
> Cc: Eric Dumazet <edumazet@xxxxxxxxxx>
> Cc: Jakub Kicinski <kuba@xxxxxxxxxx>
> Cc: Paolo Abeni <pabeni@xxxxxxxxxx>
> Cc: Simon Horman <horms@xxxxxxxxxx>
> Cc: Jason Xing <kerneljasonxing@xxxxxxxxx>
> Cc: Willem de Bruijn <willemb@xxxxxxxxxx>
> Cc: Mina Almasry <almasrymina@xxxxxxxxxx>
> Cc: "Björn Töpel" <bjorn@xxxxxxxxxx>
> Cc: Sebastian Andrzej Siewior <bigeasy@xxxxxxxxxxxxx>
> Cc: Jiayuan Chen <jiayuan.chen@xxxxxxxxx>
> Cc: netdev@xxxxxxxxxxxxxxx
> Acked-by: Jakub Kicinski <kuba@xxxxxxxxxx>
> Signed-off-by: Harry Yoo (Meta) <harry@xxxxxxxxxx>
> ---
> net/core/skbuff.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)

Looks good to me.
Reviewed-by: Hao Li <hao.li@xxxxxxxxx>

--
Thanks,
Hao