[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20201118112207.2b8bea44@kicinski-fedora-PC1C0HJN.hsd1.ca.comcast.net>
Date: Wed, 18 Nov 2020 11:22:07 -0800
From: Jakub Kicinski <kuba@...nel.org>
To: Saeed Mahameed <saeedm@...dia.com>
Cc: <netdev@...r.kernel.org>, "David S. Miller" <davem@...emloft.net>,
"Maxim Mikityanskiy" <maximmi@...lanox.com>,
Tariq Toukan <tariqt@...dia.com>,
Eric Dumazet <edumazet@...gle.com>
Subject: Re: [PATCH net 2/2] net: Call skb destructor on
NAPI_GRO_FREE_STOLEN_HEAD
On Tue, 17 Nov 2020 12:33:55 -0800 Saeed Mahameed wrote:
> From: Maxim Mikityanskiy <maximmi@...lanox.com>
>
> All GRO flows except one call skb->destructor, however, GRO_MERGED_FREE
> doesn't do it in case of NAPI_GRO_FREE_STOLEN_HEAD. For better
> consistency and to add resiliency against the drivers that may pass SKBs
> with a destructor, this patch changes napi_skb_free_stolen_head to use
> skb_release_head_state, which should perform all the needed cleanups,
> including a call to the destructor. This way the code of GRO_MERGED_FREE
> becomes similar to kfree_skb_partial.
>
> Fixes: e44699d2c280 ("net: handle NAPI_GRO_FREE_STOLEN_HEAD case also in napi_frags_finish()")
> Fixes: d7e8883cfcf4 ("net: make GRO aware of skb->head_frag")
> Signed-off-by: Maxim Mikityanskiy <maximmi@...lanox.com>
> Reviewed-by: Tariq Toukan <tariqt@...dia.com>
> Signed-off-by: Saeed Mahameed <saeedm@...dia.com>
CC Eric for GRO expertise.
Makes sense to me, but do you still need "net/mlx5e: Fix refcount leak
on kTLS RX resync" even with this applied?
> diff --git a/net/core/dev.c b/net/core/dev.c
> index 82dc6b48e45f..85dcc7f19902 100644
> --- a/net/core/dev.c
> +++ b/net/core/dev.c
> @@ -6048,8 +6048,7 @@ EXPORT_SYMBOL(gro_find_complete_by_type);
>
> static void napi_skb_free_stolen_head(struct sk_buff *skb)
> {
> - skb_dst_drop(skb);
> - skb_ext_put(skb);
> + skb_release_head_state(skb);
> kmem_cache_free(skbuff_head_cache, skb);
> }
>
Powered by blists - more mailing lists