From: xiaofeis <xiaofeis@codeaurora.org>
To: davem@davemloft.net
Cc: vkoul@kernel.org, netdev@vger.kernel.org, andrew@lunn.ch,
linux-arm-msm@vger.kernel.org, bjorn.andersson@linaro.org,
vivien.didelot@gmail.com, f.fainelli@gmail.com,
niklas.cassel@linaro.org, xiazha@codeaurora.org,
xiaofeis <xiaofeis@codeaurora.org>
Subject: [PATCH] net: dsa: input correct header length for skb_cow_head()
Date: Mon, 16 Mar 2020 09:04:05 +0800 [thread overview]
Message-ID: <1584320645-25041-1-git-send-email-xiaofeis@codeaurora.org> (raw)
We need to ensure there is enough headroom to push QCA header,
so input the QCA header length instead of 0.
Signed-off-by: xiaofeis <xiaofeis@codeaurora.org>
---
net/dsa/tag_qca.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/dsa/tag_qca.c b/net/dsa/tag_qca.c
index c958852..72c1629 100644
--- a/net/dsa/tag_qca.c
+++ b/net/dsa/tag_qca.c
@@ -36,7 +36,7 @@ static struct sk_buff *qca_tag_xmit(struct sk_buff *skb, struct net_device *dev)
dev->stats.tx_packets++;
dev->stats.tx_bytes += skb->len;
- if (skb_cow_head(skb, 0) < 0)
+ if (skb_cow_head(skb, QCA_HDR_LEN) < 0)
return NULL;
skb_push(skb, QCA_HDR_LEN);
--
2.7.4
next reply other threads:[~2020-03-16 1:04 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-16 1:04 xiaofeis [this message]
2020-03-16 9:07 ` [PATCH] net: dsa: input correct header length for skb_cow_head() David Miller
2020-03-16 9:35 ` xiaofeis
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1584320645-25041-1-git-send-email-xiaofeis@codeaurora.org \
--to=xiaofeis@codeaurora.org \
--cc=andrew@lunn.ch \
--cc=bjorn.andersson@linaro.org \
--cc=davem@davemloft.net \
--cc=f.fainelli@gmail.com \
--cc=linux-arm-msm@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=niklas.cassel@linaro.org \
--cc=vivien.didelot@gmail.com \
--cc=vkoul@kernel.org \
--cc=xiazha@codeaurora.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox