All of lore.kernel.org
 help / color / mirror / Atom feed
From: Nicolas Kaiser <nikai@nikai.net>
To: Maxin B John <maxin.john@gmail.com>
Cc: kaber@trash.net, yoshfuji@linux-ipv6.org, jmorris@namei.org,
	pekkas@netcore.fi, kuznet@ms2.inr.ac.ru, davem@davemloft.net,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] net: ipv6: mcast: Removing invalid check
Date: Sat, 14 May 2011 16:14:36 +0200	[thread overview]
Message-ID: <20110514161436.570ffd93@absol.kitzblitz> (raw)
In-Reply-To: <20110514134307.GA3603@maxin>

* Maxin B John <maxin.john@gmail.com>:
> Since the variable 'first' is assigned to 1, the check
> "if (truncate && !first)" will always be false.
> 
> Thanks to Coverity for spotting this issue.
> 
> Signed-off-by: Maxin B. John <maxin.john@gmail.com>
> ---

I don't see that. We are within a 'for' loop, and some lines
below you will find an assignment of 'first = 0;'.

Best regards,
Nicolas Kaiser

> diff --git a/net/ipv6/mcast.c b/net/ipv6/mcast.c
> index 76b8937..441c1a4 100644
> --- a/net/ipv6/mcast.c
> +++ b/net/ipv6/mcast.c
> @@ -1536,8 +1536,6 @@ static struct sk_buff *add_grec(struct sk_buff *skb, struct ifmcaddr6 *pmc,
>  
>  		if (AVAILABLE(skb) < sizeof(*psrc) +
>  		    first*sizeof(struct mld2_grec)) {
> -			if (truncate && !first)
> -				break;	 /* truncate these */
>  			if (pgr)
>  				pgr->grec_nsrcs = htons(scount);
>  			if (skb)

  reply	other threads:[~2011-05-14 14:17 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-14 13:43 [PATCH] net: ipv6: mcast: Removing invalid check Maxin B John
2011-05-14 14:14 ` Nicolas Kaiser [this message]
2011-05-14 14:32   ` Maxin B John
2011-05-14 14:33 ` Eric Dumazet
2011-05-14 14:45   ` Maxin B John

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=20110514161436.570ffd93@absol.kitzblitz \
    --to=nikai@nikai.net \
    --cc=davem@davemloft.net \
    --cc=jmorris@namei.org \
    --cc=kaber@trash.net \
    --cc=kuznet@ms2.inr.ac.ru \
    --cc=linux-kernel@vger.kernel.org \
    --cc=maxin.john@gmail.com \
    --cc=pekkas@netcore.fi \
    --cc=yoshfuji@linux-ipv6.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.