From: Dan Carpenter <error27@gmail.com>
To: Jay Vosburgh <fubar@us.ibm.com>
Cc: bonding-devel@lists.sourceforge.net, netdev@vger.kernel.org
Subject: [patch] bond_3ad.c avoid possible null deref
Date: Wed, 23 Dec 2009 15:27:10 +0200 [thread overview]
Message-ID: <20091223132710.GE17923@bicker> (raw)
A few lines earlier we assume that best->slave could be either null or non-null so
we should check it here as well.
Signed-off-by: Dan Carpenter <error27@gmail.com>
--- orig/drivers/net/bonding/bond_3ad.c 2009-12-23 00:06:58.000000000 +0200
+++ devel/drivers/net/bonding/bond_3ad.c 2009-12-23 00:07:31.000000000 +0200
@@ -1580,7 +1580,7 @@ static void ad_agg_selection_logic(struc
// check if any partner replys
if (best->is_individual) {
pr_warning("%s: Warning: No 802.3ad response from the link partner for any adapters in the bond\n",
- best->slave->dev->master->name);
+ best->slave ? best->slave->dev->master->name : "NULL");
}
best->is_active = 1;
next reply other threads:[~2009-12-23 13:27 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-12-23 13:27 Dan Carpenter [this message]
2009-12-27 4:26 ` [patch] bond_3ad.c avoid possible null deref 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=20091223132710.GE17923@bicker \
--to=error27@gmail.com \
--cc=bonding-devel@lists.sourceforge.net \
--cc=fubar@us.ibm.com \
--cc=netdev@vger.kernel.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;
as well as URLs for NNTP newsgroup(s).