Ethernet Bridge development
 help / color / mirror / Atom feed
* [Bridge] [bug report] bridge: per vlan dst_metadata netlink support
@ 2017-02-07 12:15 Dan Carpenter
  0 siblings, 0 replies; only message in thread
From: Dan Carpenter @ 2017-02-07 12:15 UTC (permalink / raw)
  To: roopa; +Cc: bridge

Hello Roopa Prabhu,

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

The patch efa5356b0d97: "bridge: per vlan dst_metadata netlink
support" from Jan 31, 2017, leads to the following Smatch complaint:

    net/bridge/br_netlink_tunnel.c:144 br_fill_vlan_tinfo_range()
    error: we previously assumed 'vtbegin' could be null (see line 130)

net/bridge/br_netlink_tunnel.c
   129	
   130		if (vtbegin && vtend && (vtend->vid - vtbegin->vid) > 0) {
                    ^^^^^^^
Check for NULL.

   131			/* add range to skb */
   132			err = br_fill_vlan_tinfo(skb, vtbegin->vid,
   133						 vtbegin->tinfo.tunnel_id,
   134						 BRIDGE_VLAN_INFO_RANGE_BEGIN);
   135			if (err)
   136				return err;
   137	
   138			err = br_fill_vlan_tinfo(skb, vtend->vid,
   139						 vtend->tinfo.tunnel_id,
   140						 BRIDGE_VLAN_INFO_RANGE_END);
   141			if (err)
   142				return err;
   143		} else {
   144			err = br_fill_vlan_tinfo(skb, vtbegin->vid,
                                                      ^^^^^^^^^^^^
Unchecked dereference.

   145						 vtbegin->tinfo.tunnel_id,
   146						 0);

regards,
dan carpenter

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

only message in thread, other threads:[~2017-02-07 12:15 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-02-07 12:15 [Bridge] [bug report] bridge: per vlan dst_metadata netlink support Dan Carpenter

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox