[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20221214110359.y4kam23sxby7vpek@skbuf>
Date: Wed, 14 Dec 2022 13:03:59 +0200
From: Vladimir Oltean <olteanv@...il.com>
To: Maksim Kiselev <bigunclemax@...il.com>
Cc: fido_max@...ox.ru, mw@...ihalf.com, Andrew Lunn <andrew@...n.ch>,
Florian Fainelli <f.fainelli@...il.com>,
"David S. Miller" <davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>,
Jakub Kicinski <kuba@...nel.org>,
Paolo Abeni <pabeni@...hat.com>,
Richard Cochran <richardcochran@...il.com>,
Russell King <linux@...linux.org.uk>, netdev@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: Subject: Locking mv88e6xxx_reg_lock twice leads deadlock for
88E6176 switch
On Wed, Dec 14, 2022 at 01:58:55AM +0300, Maksim Kiselev wrote:
> Hello, friends.
Hello.
> I have a device with Marvell 88E6176 switch.
> After 'mv88e6xxx: fix speed setting for CPU/DSA ports (cc1049ccee20)'commit was applied to
> mainline kernel I faced with a problem that switch driver stuck at 'mv88e6xxx_probe' function.
Sorry for that.
> I made some investigations and found that 'mv88e6xxx_reg_lock' called twice from the same thread which leads to deadlock.
>
> I added logs to 'mv88e6xxx_reg_lock' and 'mv88e6xxx_reg_unlock' functions to see what happened.
I hope you didn't spend too much time doing that. If you enable CONFIG_PROVE_LOCKING,
you should automatically get a stack trace with the two threads that
acquired the mutex leading to the deadlock.
I've sent a patch which solves that issue here:
https://patchwork.kernel.org/project/netdevbpf/patch/20221214110120.3368472-1-vladimir.oltean@nxp.com/
I've regression-tested it on 88E6390. Please confirm with a Tested-by:
tag on that patch that it does resolve the deadlock for 88E6176.
Thanks for reporting!
Powered by blists - more mailing lists