* [PATCH net] udp: initialize is_flist with 0 in udp_gro_receive
@ 2020-03-30 15:31 Xin Long
2020-03-30 17:01 ` Steffen Klassert
2020-03-30 17:36 ` David Miller
0 siblings, 2 replies; 3+ messages in thread
From: Xin Long @ 2020-03-30 15:31 UTC (permalink / raw)
To: network dev; +Cc: davem, Steffen Klassert, Paolo Abeni
Without NAPI_GRO_CB(skb)->is_flist initialized, when the dev doesn't
support NETIF_F_GRO_FRAGLIST, is_flist can still be set and fraglist
will be used in udp_gro_receive().
So fix it by initializing is_flist with 0 in udp_gro_receive.
Fixes: 9fd1ff5d2ac7 ("udp: Support UDP fraglist GRO/GSO.")
Signed-off-by: Xin Long <lucien.xin@gmail.com>
---
net/ipv4/udp_offload.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/net/ipv4/udp_offload.c b/net/ipv4/udp_offload.c
index 1a98583..e67a66f 100644
--- a/net/ipv4/udp_offload.c
+++ b/net/ipv4/udp_offload.c
@@ -453,6 +453,7 @@ struct sk_buff *udp_gro_receive(struct list_head *head, struct sk_buff *skb,
unsigned int off = skb_gro_offset(skb);
int flush = 1;
+ NAPI_GRO_CB(skb)->is_flist = 0;
if (skb->dev->features & NETIF_F_GRO_FRAGLIST)
NAPI_GRO_CB(skb)->is_flist = sk ? !udp_sk(sk)->gro_enabled: 1;
--
2.1.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH net] udp: initialize is_flist with 0 in udp_gro_receive
2020-03-30 15:31 [PATCH net] udp: initialize is_flist with 0 in udp_gro_receive Xin Long
@ 2020-03-30 17:01 ` Steffen Klassert
2020-03-30 17:36 ` David Miller
1 sibling, 0 replies; 3+ messages in thread
From: Steffen Klassert @ 2020-03-30 17:01 UTC (permalink / raw)
To: Xin Long; +Cc: network dev, davem, Paolo Abeni
On Mon, Mar 30, 2020 at 11:31:45PM +0800, Xin Long wrote:
> Without NAPI_GRO_CB(skb)->is_flist initialized, when the dev doesn't
> support NETIF_F_GRO_FRAGLIST, is_flist can still be set and fraglist
> will be used in udp_gro_receive().
>
> So fix it by initializing is_flist with 0 in udp_gro_receive.
>
> Fixes: 9fd1ff5d2ac7 ("udp: Support UDP fraglist GRO/GSO.")
> Signed-off-by: Xin Long <lucien.xin@gmail.com>
Acked-by: Steffen Klassert <steffen.klassert@secunet.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH net] udp: initialize is_flist with 0 in udp_gro_receive
2020-03-30 15:31 [PATCH net] udp: initialize is_flist with 0 in udp_gro_receive Xin Long
2020-03-30 17:01 ` Steffen Klassert
@ 2020-03-30 17:36 ` David Miller
1 sibling, 0 replies; 3+ messages in thread
From: David Miller @ 2020-03-30 17:36 UTC (permalink / raw)
To: lucien.xin; +Cc: netdev, steffen.klassert, pabeni
From: Xin Long <lucien.xin@gmail.com>
Date: Mon, 30 Mar 2020 23:31:45 +0800
> Without NAPI_GRO_CB(skb)->is_flist initialized, when the dev doesn't
> support NETIF_F_GRO_FRAGLIST, is_flist can still be set and fraglist
> will be used in udp_gro_receive().
>
> So fix it by initializing is_flist with 0 in udp_gro_receive.
>
> Fixes: 9fd1ff5d2ac7 ("udp: Support UDP fraglist GRO/GSO.")
> Signed-off-by: Xin Long <lucien.xin@gmail.com>
Applied and queued up for v5.6 -stable, thanks.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2020-03-30 17:36 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-30 15:31 [PATCH net] udp: initialize is_flist with 0 in udp_gro_receive Xin Long
2020-03-30 17:01 ` Steffen Klassert
2020-03-30 17:36 ` David Miller
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.