From: Dan Carpenter <dan.carpenter@oracle.com>
To: antonio@open-mesh.com
Cc: b.a.t.m.a.n@lists.open-mesh.org
Subject: [B.A.T.M.A.N.] [bug report] batman-adv: make the TT CRC logic VLAN specific
Date: Wed, 30 Nov 2016 22:53:27 +0300 [thread overview]
Message-ID: <20161130195327.GA10274@mwanda> (raw)
Hello Antonio Quartulli,
The patch 7ea7b4a14275: "batman-adv: make the TT CRC logic VLAN
specific" from Jul 30, 2013, leads to the following static checker
warning:
net/batman-adv/translation-table.c:3294 batadv_send_my_tt_response()
error: uninitialized symbol 'tt_change'.
net/batman-adv/translation-table.c
3282 if (!full_table) {
3283 spin_lock_bh(&bat_priv->tt.last_changeset_lock);
3284
3285 tt_len = bat_priv->tt.last_changeset_len;
3286 tvlv_len = batadv_tt_prepare_tvlv_local_data(bat_priv,
3287 &tvlv_tt_data,
3288 &tt_change,
3289 &tt_len);
3290 if (!tt_len)
3291 goto unlock;
This should probably be changed to:
if (!tt_len || !tvlv_len)
goto unlock;
There seems to be an assumption that "tt_len" is set to zero on the
error path? That's another way to fix this, I suppose.
3292
3293 /* Copy the last orig_node's OGM buffer */
3294 memcpy(tt_change, bat_priv->tt.last_changeset,
3295 bat_priv->tt.last_changeset_len);
3296 spin_unlock_bh(&bat_priv->tt.last_changeset_lock);
3297 } else {
See also:
net/batman-adv/translation-table.c:3313 batadv_send_my_tt_response()
error: uninitialized symbol 'tt_change'.
regards,
dan carpenter
next reply other threads:[~2016-11-30 19:53 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-11-30 19:53 Dan Carpenter [this message]
2016-12-02 16:34 ` [B.A.T.M.A.N.] [bug report] batman-adv: make the TT CRC logic VLAN specific Sven Eckelmann
2016-12-05 10:06 ` Dan Carpenter
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=20161130195327.GA10274@mwanda \
--to=dan.carpenter@oracle.com \
--cc=antonio@open-mesh.com \
--cc=b.a.t.m.a.n@lists.open-mesh.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox