From: Li Wei <lw@cn.fujitsu.com>
To: Dan Carpenter <dan.carpenter@oracle.com>
Cc: netdev@vger.kernel.org
Subject: Re: IPv6: Fix not join all-router mcast group when forwarding set.
Date: Thu, 08 Mar 2012 09:02:59 +0800 [thread overview]
Message-ID: <4F580543.7010405@cn.fujitsu.com> (raw)
In-Reply-To: <20120307114502.GA13204@elgon.mountain>
> Hello Li Wei,
>
> This is a semi-automatic email about new static checker warnings.
>
> The patch d6ddef9e641d: "IPv6: Fix not join all-router mcast group
> when forwarding set." from Mar 5, 2012, leads to the following Smatch
> complaint:
>
> net/ipv6/addrconf.c:438 ipv6_add_dev()
> warn: variable dereferenced before check 'dev' (see line 432)
>
> net/ipv6/addrconf.c
> 431 /* protected by rtnl_lock */
> 432 rcu_assign_pointer(dev->ip6_ptr, ndev);
> ^^^^^^^^^^^^
> Old dereference.
>
> 433
> 434 /* Join all-node multicast group */
> 435 ipv6_dev_mc_inc(dev, &in6addr_linklocal_allnodes);
> 436
> 437 /* Join all-router multicast group if forwarding is set */
> 438 if (ndev->cnf.forwarding && dev && (dev->flags & IFF_MULTICAST))
> ^^^
>
> New check. Probably you can just remove the check?
>
> 439 ipv6_dev_mc_inc(dev, &in6addr_linklocal_allrouters);
> 440
>
> regards,
> dan carpenter
>
>
>
Hi Dan,
Thanks for your report, I have sent a patch to fix this.
Regards,
Li Wei
prev parent reply other threads:[~2012-03-08 1:13 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-03-07 11:45 IPv6: Fix not join all-router mcast group when forwarding set Dan Carpenter
2012-03-08 1:02 ` Li Wei [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=4F580543.7010405@cn.fujitsu.com \
--to=lw@cn.fujitsu.com \
--cc=dan.carpenter@oracle.com \
--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 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.