aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4/tcp_output.c
diff options
context:
space:
mode:
authorVladimir Oltean <[email protected]>2022-11-29 14:12:21 +0000
committerPaolo Abeni <[email protected]>2022-12-01 12:40:22 +0000
commit87db82cb614973a87a03ac298ad4ab4c5ca5d38e (patch)
tree37e7e31b34dfdfbfb897406f587bae8512219223 /net/ipv4/tcp_output.c
parentnet: dpaa2-switch: serialize changes to priv->mac with a mutex (diff)
downloadkernel-87db82cb614973a87a03ac298ad4ab4c5ca5d38e.tar.gz
kernel-87db82cb614973a87a03ac298ad4ab4c5ca5d38e.zip
net: dpaa2-mac: move rtnl_lock() only around phylink_{,dis}connect_phy()
After the introduction of a private mac_lock that serializes access to priv->mac (and port_priv->mac in the switch), the only remaining purpose of rtnl_lock() is to satisfy the locking requirements of phylink_fwnode_phy_connect() and phylink_disconnect_phy(). But the functions these live in, dpaa2_mac_connect() and dpaa2_mac_disconnect(), have contradictory locking requirements. While phylink_fwnode_phy_connect() wants rtnl_lock() to be held, phylink_create() wants it to not be held. Move the rtnl_lock() from top-level (in the dpaa2-eth and dpaa2-switch drivers) to only surround the phylink calls that require it, in the dpaa2-mac library code. This is possible because dpaa2_mac_connect() and dpaa2_mac_disconnect() run unlocked, and there isn't any danger of an AB/BA deadlock between the rtnl_mutex and other private locks. Signed-off-by: Vladimir Oltean <[email protected]> Reviewed-by: Ioana Ciornei <[email protected]> Tested-by: Ioana Ciornei <[email protected]> Signed-off-by: Paolo Abeni <[email protected]>
Diffstat (limited to 'net/ipv4/tcp_output.c')
0 files changed, 0 insertions, 0 deletions