From: Dan Carpenter <error27@gmail.com>
To: panweiping3@gmail.com
Cc: "open list:BONDING DRIVER" <netdev@vger.kernel.org>
Subject: [smatch] re: bonding:delete lacp_fast from ad_bond_info
Date: Sat, 11 Jun 2011 11:12:14 +0300 [thread overview]
Message-ID: <20110611081214.GA21427@shale.localdomain> (raw)
There was a dereference before a check added in 56d00c677de0a
"bonding:delete lacp_fast from ad_bond_info"
drivers/net/bonding/bond_3ad.c +1907 bond_3ad_bind_slave(7)
warn: variable dereferenced before check 'bond'
1900 int bond_3ad_bind_slave(struct slave *slave)
1901 {
1902 struct bonding *bond = bond_get_bond_by_slave(slave);
1903 int lacp_fast = bond->params.lacp_fast;
^^^^^^^^^^^^
dereference.
1904 struct port *port;
1905 struct aggregator *aggregator;
1906
1907 if (bond == NULL) {
^^^^^^^^^^^^
check.
1908 pr_err("%s: The slave %s is not attached to its bond\n",
1909 slave->dev->master->name, slave->dev->name);
1910 return -1;
1911 }
regards,
dan carpenter
next reply other threads:[~2011-06-11 8:16 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-06-11 8:12 Dan Carpenter [this message]
2011-06-13 14:30 ` [PATCH] bonding:delete a dereference before check Weiping Pan
2011-06-13 22:11 ` Jay Vosburgh
2011-06-13 22:29 ` David Miller
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=20110611081214.GA21427@shale.localdomain \
--to=error27@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=panweiping3@gmail.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