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" <dav…@davemloft.net>
> Cc: Eric Dumazet <edum…@google.com>
> Cc: Jakub Kicinski <ku…@kernel.org>
> Cc: Paolo Abeni <pabe…@redhat.com>
> Cc: Simon Horman <hor…@kernel.org>
> Cc: Jason Xing <kern…@gmail.com>
> Cc: Willem de Bruijn <will…@google.com>
> Cc: Mina Almasry <alma…@google.com>
> Cc: "Björn Töpel" <bjo…@kernel.org>
> Cc: Sebastian Andrzej Siewior <bige…@linutronix.de>
> Cc: Jiayuan Chen <jiay…@linux.dev>
> Cc: netd…@vger.kernel.org
> Acked-by: Jakub Kicinski <ku…@kernel.org>
> Signed-off-by: Harry Yoo (Meta) <har…@kernel.org>
> ---
> net/core/skbuff.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
Looks good to me.
Reviewed-by: Hao Li <hao…@linux.dev>
--
Thanks,
Hao