From: David Miller <davem@davemloft.net>
To: daniel@iogearbox.net
Cc: jiri@resnulli.us, netdev@vger.kernel.org
Subject: Re: [PATCH net v2] vlan: pull on __vlan_insert_tag error path and fix csum correction
Date: Fri, 15 Apr 2016 23:20:49 -0400 (EDT) [thread overview]
Message-ID: <20160415.232049.1582872962762792747.davem@davemloft.net> (raw)
In-Reply-To: <bde2d4bf994b57e3ca25960d4b347212c8077ac6.1460765959.git.daniel@iogearbox.net>
From: Daniel Borkmann <daniel@iogearbox.net>
Date: Sat, 16 Apr 2016 02:27:58 +0200
> When __vlan_insert_tag() fails from skb_vlan_push() path due to the
> skb_cow_head(), we need to undo the __skb_push() in the error path
> as well that was done earlier to move skb->data pointer to mac header.
>
> Moreover, I noticed that when in the non-error path the __skb_pull()
> is done and the original offset to mac header was non-zero, we fixup
> from a wrong skb->data offset in the checksum complete processing.
>
> So the skb_postpush_rcsum() really needs to be done before __skb_pull()
> where skb->data still points to the mac header start and thus operates
> under the same conditions as in __vlan_insert_tag().
>
> Fixes: 93515d53b133 ("net: move vlan pop/push functions into common code")
> Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
> Reviewed-by: Jiri Pirko <jiri@mellanox.com>
> ---
> v1 -> v2:
> - Resend/code still the same, Jiri gave it a review as well meanwhile.
Applied and queued up for -stable, thanks Daniel.
prev parent reply other threads:[~2016-04-16 3:20 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-04-16 0:27 [PATCH net v2] vlan: pull on __vlan_insert_tag error path and fix csum correction Daniel Borkmann
2016-04-16 3:20 ` David Miller [this message]
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=20160415.232049.1582872962762792747.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=daniel@iogearbox.net \
--cc=jiri@resnulli.us \
--cc=netdev@vger.kernel.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;
as well as URLs for NNTP newsgroup(s).