All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@oracle.com>
To: andy@greyhouse.net
Cc: netdev@vger.kernel.org
Subject: re: bonding: remove entries for master_ip and vlan_ip and query devices instead
Date: Thu, 25 Oct 2012 15:29:09 +0300	[thread overview]
Message-ID: <20121025122908.GA20595@elgon.mountain> (raw)

[ Sort of old, but apparently I didn't email about this in March ].

Hello Andy Gospodarek,

This is a semi-automatic email about new static checker warnings.

The patch eaddcd76903c: "bonding: remove entries for master_ip and 
vlan_ip and query devices instead" from Mar 22, 2012, leads to the 
following Smatch complaint:

drivers/net/bonding/bond_main.c:2703 bond_arp_send_all()
	 warn: variable dereferenced before check 'vlan_dev' (see line 2697)

drivers/net/bonding/bond_main.c
  2696					vlan_id = vlan->vlan_id;
                                        ^^^^^^^^^^
If vlan_id is non-zero it means we went hit this assignment.

  2697					pr_debug("basa: vlan match on %s %d\n",
  2698					       vlan_dev->name, vlan_id);
                                               ^^^^^^^^^^
Old dereference.

  2699					break;
  2700				}
  2701			}
  2702	
  2703			if (vlan_id && vlan_dev) {
                                       ^^^^^^^^
New check.

  2704				ip_rt_put(rt);
  2705				addr = bond_confirm_addr(vlan_dev, targets[i], 0);

regards,
dan carpenter

                 reply	other threads:[~2012-10-25 12:29 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20121025122908.GA20595@elgon.mountain \
    --to=dan.carpenter@oracle.com \
    --cc=andy@greyhouse.net \
    --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.