Skip to content

Commit

Permalink
bond_3ad.c avoid possible null deref
Browse files Browse the repository at this point in the history
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>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Dan Carpenter authored and David S. Miller committed Dec 27, 2009
1 parent 1f04493 commit c99a3d2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/net/bonding/bond_3ad.c
Original file line number Diff line number Diff line change
Expand Up @@ -1580,7 +1580,7 @@ static void ad_agg_selection_logic(struct aggregator *agg)
// 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;
Expand Down

0 comments on commit c99a3d2

Please sign in to comment.