[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20230907103124.6adb7256@kernel.org>
Date: Thu, 7 Sep 2023 10:31:24 -0700
From: Jakub Kicinski <kuba@...nel.org>
To: Taehee Yoo <ap420073@...il.com>
Cc: davem@...emloft.net, pabeni@...hat.com, edumazet@...gle.com,
jiri@...nulli.us, netdev@...r.kernel.org,
syzbot+9bbbacfbf1e04d5221f7@...kaller.appspotmail.com
Subject: Re: [PATCH net] net: team: do not use dynamic lockdep key
On Tue, 5 Sep 2023 08:46:10 +0000 Taehee Yoo wrote:
> @@ -1203,18 +1203,31 @@ static int team_port_add(struct team *team, struct net_device *port_dev,
>
> memcpy(port->orig.dev_addr, port_dev->dev_addr, port_dev->addr_len);
>
> - err = team_port_enter(team, port);
> + err = dev_open(port_dev, extack);
> if (err) {
> - netdev_err(dev, "Device %s failed to enter team mode\n",
> + netdev_dbg(dev, "Device %s opening failed\n",
> portname);
> - goto err_port_enter;
> + goto err_dev_open;
> }
>
> - err = dev_open(port_dev, extack);
> + err = team_upper_dev_link(team, port, extack);
I'm guessing the syzbot complaint:
https://lore.kernel.org/all/000000000000e44e4a0604c66b67@google.com/
is related to this reordering of team_upper_dev_link() before things
are initialized. I'll revert this version in net, let's target v2 at
net-next, next week? "lockdep runs out of keys" isn't a real bug,
or at least I don't think the benefit is high enough for pushing
functional code changes into current release. Sounds reasonable?
> if (err) {
> - netdev_dbg(dev, "Device %s opening failed\n",
> + netdev_err(dev, "Device %s failed to set upper link\n",
> portname);
> - goto err_dev_open;
> + goto err_set_upper_link;
> + }
> +
> + /* lockdep subclass variable(dev->nested_level) was updated by
> + * team_upper_dev_link().
> + */
> + team_unlock(team);
> + team_lock(team);
> +
> + err = team_port_enter(team, port);
> + if (err) {
> + netdev_err(dev, "Device %s failed to enter team mode\n",
> + portname);
> + goto err_port_enter;
> }
>
> err = vlan_vids_add_by_dev(port_dev, dev);
> @@ -1242,13 +1255,6 @@ static int team_port_add(struct team *team, struct net_device *port_dev,
> goto err_handler_register;
> }
>
> - err = team_upper_dev_link(team, port, extack);
> - if (err) {
> - netdev_err(dev, "Device %s failed to set upper link\n",
> - portname);
> - goto err_set_upper_link;
> - }
Powered by blists - more mailing lists