netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Mike Galbraith <umgwanakikbuti@gmail.com>
To: Herbert Xu <herbert@gondor.apana.org.au>
Cc: netdev@vger.kernel.org, pshelar@nicira.com, linux-kernel@vger.kernel.org
Subject: Re: skbuff: Fix checksum start check in skb_postpull_rcsum
Date: Thu, 01 Oct 2015 13:48:13 +0200	[thread overview]
Message-ID: <1443700093.3237.0.camel@gmail.com> (raw)
In-Reply-To: <20151001113407.GA26772@gondor.apana.org.au>

Yup, all better.  Thanks.

	-Mike

On Thu, 2015-10-01 at 19:34 +0800, Herbert Xu wrote:
> In skb_postpull_rcsum the skb has already been pulled so we should
> be testing whether the checksum start offset is non-negative rather
> than how it compares to the length that we have pulled.
> 
> Fixes: 6ae459bdaaee ("skbuff: Fix skb checksum flag on skb pull")
> Reported-by: Mike Galbraith <umgwanakikbuti@gmail.com>
> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
> 
> diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h
> index 2b0a30a..4398411 100644
> --- a/include/linux/skbuff.h
> +++ b/include/linux/skbuff.h
> @@ -2708,7 +2708,7 @@ static inline void skb_postpull_rcsum(struct sk_buff *skb,
>  	if (skb->ip_summed == CHECKSUM_COMPLETE)
>  		skb->csum = csum_sub(skb->csum, csum_partial(start, len, 0));
>  	else if (skb->ip_summed == CHECKSUM_PARTIAL &&
> -		 skb_checksum_start_offset(skb) <= len)
> +		 skb_checksum_start_offset(skb) < 0)
>  		skb->ip_summed = CHECKSUM_NONE;
>  }
>  

  reply	other threads:[~2015-10-01 11:48 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-01  7:55 [regression] 6ae459bd skbuff: Fix skb checksum flag on skb pull Mike Galbraith
2015-10-01  8:42 ` Herbert Xu
2015-10-01 11:16   ` Mike Galbraith
2015-10-01 11:21     ` Herbert Xu
2015-10-01 11:34       ` skbuff: Fix checksum start check in skb_postpull_rcsum Herbert Xu
2015-10-01 11:48         ` Mike Galbraith [this message]
2015-10-01 15:15         ` David Miller
2015-10-01 15:15           ` Herbert Xu
2015-10-01 10:51 ` [regression] 6ae459bd skbuff: Fix skb checksum flag on skb pull Yanko Kaneti

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=1443700093.3237.0.camel@gmail.com \
    --to=umgwanakikbuti@gmail.com \
    --cc=herbert@gondor.apana.org.au \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pshelar@nicira.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).