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 2/2] net: dsa: tag_ar9331: Make sure there is headroom for tag
Date: Thu, 13 Feb 2020 15:37:10 +0100 [thread overview]
Message-ID: <20200213143710.22811-3-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_ar9331.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/dsa/tag_ar9331.c b/net/dsa/tag_ar9331.c
index 466ffa92a474..55b00694cdba 100644
--- a/net/dsa/tag_ar9331.c
+++ b/net/dsa/tag_ar9331.c
@@ -31,7 +31,7 @@ static struct sk_buff *ar9331_tag_xmit(struct sk_buff *skb,
__le16 *phdr;
u16 hdr;
- if (skb_cow_head(skb, 0) < 0)
+ if (skb_cow_head(skb, AR9331_HDR_LEN) < 0)
return NULL;
phdr = skb_push(skb, AR9331_HDR_LEN);
--
2.11.0
next prev parent reply other threads:[~2020-02-13 14:37 UTC|newest]
Thread overview: 10+ 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 ` [PATCH net 1/2] net: dsa: tag_qca: " Per Forlin
2020-02-13 20:02 ` Florian Fainelli
2020-02-13 14:37 ` Per Forlin [this message]
2020-02-13 20:02 ` [PATCH net 2/2] net: dsa: tag_ar9331: " 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:51 ` [PATCH net 2/2] net: dsa: tag_ar9331: " Per, Forlin <per.forlin
2020-02-13 13:59 ` Oleksij Rempel
2020-02-13 14:42 ` Per Förlin
2020-02-13 14:26 ` David Miller
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-3-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).