From: Jay Vosburgh <jay.vosburgh@canonical.com>
To: patchwork-bot+netdevbpf@kernel.org
Cc: Sun Shouxin <sunshouxin@chinatelecom.cn>,
vfalico@gmail.com, andy@greyhouse.net, davem@davemloft.net,
edumazet@google.com, kuba@kernel.org, pabeni@redhat.com,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
razor@blackwall.org, huyd12@chinatelecom.cn
Subject: Re: [PATCH v2] net:bonding:support balance-alb interface with vlan to bridge
Date: Wed, 10 Aug 2022 14:09:42 -0700 [thread overview]
Message-ID: <3917.1660165782@famine> (raw)
In-Reply-To: <166013581540.3703.5149069391225440733.git-patchwork-notify@kernel.org>
patchwork-bot+netdevbpf@kernel.org wrote:
>Hello:
>
>This patch was applied to netdev/net.git (master)
>by David S. Miller <davem@davemloft.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@canonical.com
next prev parent reply other threads:[~2022-08-10 21:09 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-09 6:21 [PATCH v2] net:bonding:support balance-alb interface with vlan to bridge Sun Shouxin
2022-08-10 12:50 ` patchwork-bot+netdevbpf
2022-08-10 21:09 ` Jay Vosburgh [this message]
2022-08-10 14:32 ` Jay Vosburgh
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3917.1660165782@famine \
--to=jay.vosburgh@canonical.com \
--cc=andy@greyhouse.net \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=huyd12@chinatelecom.cn \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=patchwork-bot+netdevbpf@kernel.org \
--cc=razor@blackwall.org \
--cc=sunshouxin@chinatelecom.cn \
--cc=vfalico@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).