mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-28 23:24:50 +00:00
bond_3ad.c avoid possible null deref
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>
This commit is contained in:
parent
1f04493123
commit
c99a3d2e04
1 changed files with 1 additions and 1 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue