From: Maxin B John <maxin.john@gmail.com>
To: netdev@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, kaber@trash.net,
yoshfuji@linux-ipv6.org, jmorris@namei.org, pekkas@netcore.fi,
kuznet@ms2.inr.ac.ru, davem@davemloft.net
Subject: [PATCH] net: ipv6: mcast: Removing invalid check
Date: Sat, 14 May 2011 16:43:07 +0300 [thread overview]
Message-ID: <20110514134307.GA3603@maxin> (raw)
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>
---
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)
next reply other threads:[~2011-05-14 13:43 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-05-14 13:43 Maxin B John [this message]
2011-05-14 14:33 ` [PATCH] net: ipv6: mcast: Removing invalid check 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=20110514134307.GA3603@maxin \
--to=maxin.john@gmail.com \
--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=netdev@vger.kernel.org \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox