From: Dan Carpenter <dan.carpenter@oracle.com>
To: roopa@cumulusnetworks.com
Cc: bridge@lists.linux-foundation.org
Subject: [Bridge] [bug report] bridge: per vlan dst_metadata netlink support
Date: Tue, 7 Feb 2017 15:15:21 +0300 [thread overview]
Message-ID: <20170207121520.GA15359@mwanda> (raw)
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
reply other threads:[~2017-02-07 12:15 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=20170207121520.GA15359@mwanda \
--to=dan.carpenter@oracle.com \
--cc=bridge@lists.linux-foundation.org \
--cc=roopa@cumulusnetworks.com \
/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