Skip to content

Commit 9c80796

Browse files
d-tatianindavem330
authored andcommitted
drivers/net/bonding/bond_3ad: return when there's no aggregator
Otherwise we would dereference a NULL aggregator pointer when calling __set_agg_ports_ready on the line below. Found by Linux Verification Center (linuxtesting.org) with the SVACE static analysis tool. Fixes: 1da177e ("Linux-2.6.12-rc2") Signed-off-by: Daniil Tatianin <[email protected]> Reviewed-by: Jiri Pirko <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent d57609f commit 9c80796

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

drivers/net/bonding/bond_3ad.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1549,6 +1549,7 @@ static void ad_port_selection_logic(struct port *port, bool *update_slave_arr)
15491549
slave_err(bond->dev, port->slave->dev,
15501550
"Port %d did not find a suitable aggregator\n",
15511551
port->actor_port_number);
1552+
return;
15521553
}
15531554
}
15541555
/* if all aggregator's ports are READY_N == TRUE, set ready=TRUE

0 commit comments

Comments
 (0)