OSDN Git Service

net: sfp: swap order of rtnl and st_mutex locks
authorRussell King (Oracle) <rmk+kernel@armlinux.org.uk>
Wed, 17 May 2023 10:37:57 +0000 (11:37 +0100)
committerJakub Kicinski <kuba@kernel.org>
Fri, 19 May 2023 02:52:31 +0000 (19:52 -0700)
commita9fe964e7aaeb3fc06a91c21269d0ac8b5afcea8
treefd0a8b20e8616c32c3503072769bc600b7b61336
parentd47e5a430dfd8b15739a118e4a2add5fa90347fd
net: sfp: swap order of rtnl and st_mutex locks

Swap the order of the rtnl and st_mutex locks - st_mutex is now nested
beneath rtnl lock instead of rtnl being beneath st_mutex. This will
allow us to hold st_mutex only while manipulating the module's hardware
or software control state.

Reviewed-by: Simon Horman <simon.horman@corigine.com>
Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/phy/sfp.c