[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <3917.1660165782@famine>
Date: Wed, 10 Aug 2022 14:09:42 -0700
From: Jay Vosburgh <jay.vosburgh@...onical.com>
To: patchwork-bot+netdevbpf@...nel.org
cc: Sun Shouxin <sunshouxin@...natelecom.cn>, vfalico@...il.com,
andy@...yhouse.net, davem@...emloft.net, edumazet@...gle.com,
kuba@...nel.org, pabeni@...hat.com, netdev@...r.kernel.org,
linux-kernel@...r.kernel.org, razor@...ckwall.org,
huyd12@...natelecom.cn
Subject: Re: [PATCH v2] net:bonding:support balance-alb interface with vlan to bridge
patchwork-bot+netdevbpf@...nel.org wrote:
>Hello:
>
>This patch was applied to netdev/net.git (master)
>by David S. Miller <davem@...emloft.net>:
>
>On Mon, 8 Aug 2022 23:21:03 -0700 you wrote:
>> In my test, balance-alb bonding with two slaves eth0 and eth1,
>> and then Bond0.150 is created with vlan id attached bond0.
>> After adding bond0.150 into one linux bridge, I noted that Bond0,
>> bond0.150 and bridge were assigned to the same MAC as eth0.
>> Once bond0.150 receives a packet whose dest IP is bridge's
>> and dest MAC is eth1's, the linux bridge will not match
>> eth1's MAC entry in FDB, and not handle it as expected.
>> The patch fix the issue, and diagram as below:
>>
>> [...]
>
>Here is the summary with links:
> - [v2] net:bonding:support balance-alb interface with vlan to bridge
> https://git.kernel.org/netdev/net/c/d5410ac7b0ba
>
>You are awesome, thank you!
There looks to be a reference count leak in the existing patch
(ip_dev_find acquires a reference that is not released). I.e., it needs
something like:
diff --git a/drivers/net/bonding/bond_alb.c b/drivers/net/bonding/bond_alb.c
index 60cb9a0225aa..b9dbad3a8af8 100644
--- a/drivers/net/bonding/bond_alb.c
+++ b/drivers/net/bonding/bond_alb.c
@@ -668,8 +668,11 @@ static struct slave *rlb_arp_xmit(struct sk_buff *skb, struct bonding *bond)
dev = ip_dev_find(dev_net(bond->dev), arp->ip_src);
if (dev) {
- if (netif_is_bridge_master(dev))
+ if (netif_is_bridge_master(dev)) {
+ dev_put(dev);
return NULL;
+ }
+ dev_put(dev);
}
if (arp->op_code == htons(ARPOP_REPLY)) {
I haven't tested this, but it seems correct. Comments?
I'll create a formal submission here in a bit.
-J
---
-Jay Vosburgh, jay.vosburgh@...onical.com
Powered by blists - more mailing lists