[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <e89ca1c2-abb6-4030-9c52-f64c1ca15bf6@lunn.ch>
Date: Sun, 27 Jul 2025 20:28:37 +0200
From: Andrew Lunn <andrew@...n.ch>
To: Ujwal Kundur <ujwal.kundur@...il.com>
Cc: syzbot+8182574047912f805d59@...kaller.appspotmail.com,
davem@...emloft.net, edumazet@...gle.com, horms@...nel.org,
kuba@...nel.org, linux-kernel@...r.kernel.org,
netdev@...r.kernel.org, pabeni@...hat.com,
syzkaller-bugs@...glegroups.com, jiri@...nulli.us,
andrew+netdev@...n.ch
Subject: Re: [RFC PATCH] net: team: switch to spinlock in team_change_rx_flags
> drivers/net/team/team_core.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/net/team/team_core.c b/drivers/net/team/team_core.c
> index 8bc56186b2a3..4568075fea6e 100644
> --- a/drivers/net/team/team_core.c
> +++ b/drivers/net/team/team_core.c
> @@ -1778,7 +1778,7 @@ static void team_change_rx_flags(struct net_device *dev, int change)
> struct team_port *port;
> int inc;
>
> - mutex_lock(&team->lock);
> + spin_lock(&team->lock);
> list_for_each_entry(port, &team->port_list, list) {
> if (change & IFF_PROMISC) {
> inc = dev->flags & IFF_PROMISC ? 1 : -1;
> @@ -1789,7 +1789,7 @@ static void team_change_rx_flags(struct net_device *dev, int change)
> dev_set_allmulti(port->dev, inc);
> }
> }
> - mutex_unlock(&team->lock);
> + spin_unlock(&team->lock);
> }
void __sched mutex_unlock(struct mutex *lock)
static __always_inline void spin_unlock(spinlock_t *lock)
They take different parameters. So you need to also change the struct
team to change lock from mutex to a spinlock. And what about all the
other users of team->lock?
Did not compile this change? I doubt you did, or you would of get
warnings, maybe errors.
Andrew
Powered by blists - more mailing lists