lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 linux-hardening PHC | |
Open Source and information security mailing list archives
| ||
|
Date: Sat, 1 Aug 2020 17:36:05 +0800 From: linmiaohe <linmiaohe@...wei.com> To: <davem@...emloft.net>, <kuba@...nel.org>, <pshelar@....org>, <martin.varghese@...ia.com>, <fw@...len.de>, <pabeni@...hat.com>, <edumazet@...gle.com>, <dcaratti@...hat.com>, <steffen.klassert@...unet.com>, <shmulik@...anetworks.com>, <kyk.segfault@...il.com> CC: <netdev@...r.kernel.org>, <linux-kernel@...r.kernel.org>, <linmiaohe@...wei.com> Subject: [PATCH] net: Pass NULL to skb_network_protocol() when we don't care about vlan depth From: Miaohe Lin <linmiaohe@...wei.com> When we don't care about vlan depth, we could pass NULL instead of the address of a unused local variable to skb_network_protocol() as a param. Signed-off-by: Miaohe Lin <linmiaohe@...wei.com> --- net/core/skbuff.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/net/core/skbuff.c b/net/core/skbuff.c index 3219c26ddfae..8a0c39e4ab0a 100644 --- a/net/core/skbuff.c +++ b/net/core/skbuff.c @@ -3758,7 +3758,6 @@ struct sk_buff *skb_segment(struct sk_buff *head_skb, int err = -ENOMEM; int i = 0; int pos; - int dummy; if (list_skb && !list_skb->head_frag && skb_headlen(list_skb) && (skb_shinfo(head_skb)->gso_type & SKB_GSO_DODGY)) { @@ -3780,7 +3779,7 @@ struct sk_buff *skb_segment(struct sk_buff *head_skb, } __skb_push(head_skb, doffset); - proto = skb_network_protocol(head_skb, &dummy); + proto = skb_network_protocol(head_skb, NULL); if (unlikely(!proto)) return ERR_PTR(-EINVAL); -- 2.19.1
Powered by blists - more mailing lists