netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* re: bonding: remove entries for master_ip and vlan_ip and query devices instead
@ 2012-10-25 12:29 Dan Carpenter
  0 siblings, 0 replies; only message in thread
From: Dan Carpenter @ 2012-10-25 12:29 UTC (permalink / raw)
  To: andy; +Cc: netdev

[ 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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2012-10-25 12:29 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-10-25 12:29 bonding: remove entries for master_ip and vlan_ip and query devices instead Dan Carpenter

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).