bonding: Break instead of returning in alb_send_learning_packets
Subsystems (2)
PATCH 1/1 bonding: Break instead of returning in alb_send_learning_packets
From: Alexander Grund <[email protected]>
The upstream commit used a function which upon returning an error value would break out of the surrounding loop.
In 4.4.x the loop is inside the function alb_send_learning_packets hence returning would be wrong as it will skip the rcu_read_unlock. Moreover returning a value from a void function doesn't even compile.
Fixes d6b83f1e (bonding: return -ENOMEM instead of BUG in alb_upper_dev_walk)
--- drivers/net/bonding/bond_alb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/bonding/bond_alb.c +1 -1
@@ -986,7 +986,7 @@ static void alb_send_learning_packets(struct slave *slave, u8 mac_addr[],if (netif_is_macvlan (upper) && !strict_match) { tags =bond_verify_device_path (bond->dev, upper,0 );if (IS_ERR_OR_NULL (tags)) -return -ENOMEM ; +break ;alb_send_lp_vid (slave, upper->dev_addr, tags[0 ].vlan_proto, tags[0 ].vlan_id);
Signature · 1 line
2.40.1
Ulrich Hecht
AppliedQuoted 12 lines · CET Alexander Grund
From: Alexander Grund <[email protected]>
The upstream commit used a function which upon returning an error value would break out of the surrounding loop.
In 4.4.x the loop is inside the functionalb_send_learning_packetshence returning would be wrong as it will skip thercu_read_unlock. Moreover returning a value from a void function doesn't even compile.
Quoted 3 lines
Fixes
d6b83f1e(bonding: return-ENOMEMinstead of BUG inalb_upper_dev_walk)Signed-off-by Alexander Grund <[email protected]>
Thanks, applied.
CU
Uli