* [PATCH 4.4] bonding: Break instead of returning in alb_send_learning_packets
@ 2024-03-23 12:43 Alexander Grund
2024-04-04 12:46 ` Ulrich Hecht
0 siblings, 1 reply; 2+ messages in thread
From: Alexander Grund @ 2024-03-23 12:43 UTC (permalink / raw)
To: cip-dev; +Cc: uli+cip
From: Alexander Grund <flamefire89@gmail.com>
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)
Signed-off-by: Alexander Grund <flamefire89@gmail.com>
---
drivers/net/bonding/bond_alb.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/bonding/bond_alb.c b/drivers/net/bonding/bond_alb.c
index 5321de9d80f7e..25943d6b04e12 100644
--- a/drivers/net/bonding/bond_alb.c
+++ b/drivers/net/bonding/bond_alb.c
@@ -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);
--
2.40.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH 4.4] bonding: Break instead of returning in alb_send_learning_packets
2024-03-23 12:43 [PATCH 4.4] bonding: Break instead of returning in alb_send_learning_packets Alexander Grund
@ 2024-04-04 12:46 ` Ulrich Hecht
0 siblings, 0 replies; 2+ messages in thread
From: Ulrich Hecht @ 2024-04-04 12:46 UTC (permalink / raw)
To: Alexander Grund, cip-dev
> On 03/23/2024 1:43 PM CET Alexander Grund <theflamefire89@gmail.com> wrote:
>
>
> From: Alexander Grund <flamefire89@gmail.com>
>
> 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)
>
> Signed-off-by: Alexander Grund <flamefire89@gmail.com>
Thanks, applied.
CU
Uli
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-04-04 12:46 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-03-23 12:43 [PATCH 4.4] bonding: Break instead of returning in alb_send_learning_packets Alexander Grund
2024-04-04 12:46 ` Ulrich Hecht
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).