From: Per Forlin <per.forlin@axis.com>
To: <netdev@vger.kernel.org>, <andrew@lunn.ch>,
<o.rempel@pengutronix.de>, <davem@davemloft.net>
Cc: Per Forlin <per.forlin@axis.com>, Per Forlin <perfn@axis.com>
Subject: [PATCH net 1/2] net: dsa: tag_qca: Make sure there is headroom for tag
Date: Thu, 13 Feb 2020 15:37:09 +0100 [thread overview]
Message-ID: <20200213143710.22811-2-per.forlin@axis.com> (raw)
In-Reply-To: <20200213143710.22811-1-per.forlin@axis.com>
Passing tag size to skb_cow_head will make sure
there is enough headroom for the tag data.
This change does not introduce any overhead in case there
is already available headroom for tag.
Signed-off-by: Per Forlin <perfn@axis.com>
---
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 c8a128c9e5e0..70db7c909f74 100644
--- a/net/dsa/tag_qca.c
+++ b/net/dsa/tag_qca.c
@@ -33,7 +33,7 @@ static struct sk_buff *qca_tag_xmit(struct sk_buff *skb, struct net_device *dev)
struct dsa_port *dp = dsa_slave_to_port(dev);
u16 *phdr, hdr;
- 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.11.0
next prev parent reply other threads:[~2020-02-13 14:37 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-02-13 14:37 [PATCH net 0/2] net: dsa: Make sure there is headroom for tag Per Forlin
2020-02-13 14:37 ` Per Forlin [this message]
2020-02-13 20:02 ` [PATCH net 1/2] net: dsa: tag_qca: " Florian Fainelli
2020-02-13 14:37 ` [PATCH net 2/2] net: dsa: tag_ar9331: " Per Forlin
2020-02-13 20:02 ` Florian Fainelli
2020-02-14 15:35 ` [PATCH net 0/2] net: dsa: " David Miller
-- strict thread matches above, loose matches on Subject: below --
2020-02-13 13:50 Per, Forlin <per.forlin
2020-02-13 13:50 ` [PATCH net 1/2] net: dsa: tag_qca: " Per, Forlin <per.forlin
2020-02-13 14:01 ` Andrew Lunn
2020-02-13 15:08 ` Per Förlin
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=20200213143710.22811-2-per.forlin@axis.com \
--to=per.forlin@axis.com \
--cc=andrew@lunn.ch \
--cc=davem@davemloft.net \
--cc=netdev@vger.kernel.org \
--cc=o.rempel@pengutronix.de \
--cc=perfn@axis.com \
/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;
as well as URLs for NNTP newsgroup(s).