alx: fix a double unlock in alx_probe()
Subsystems (4)
PATCH 1/2 alx: fix a double unlock in alx_probe()
We're not holding the lock at this point so "goto unlock;" should be "goto unmap;"
Fixes 4a5fe57e7751 ("alx: use fine-grained locking instead of RTNL")
Signed-off-by Dan Carpenter <[email protected]>
--- drivers/net/ethernet/atheros/alx/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/ethernet/atheros/alx/main.c +1 -1
@@ -1859,7 +1859,7 @@ static int alx_probe(struct pci_dev *pdev, const struct pci_device_id *ent) err =register_netdev (netdev);if (err) {dev_err (&pdev->dev,"register netdevice failed\n" ); - goto out_unlock; + goto out_unmap; } netdev_info(netdev,
Signature · 1 line
2.30.2
PATCH 2/2 alx: unlock on error in alx_set_pauseparam()
We need to drop the lock before returning on this error path.
Fixes 4a5fe57e7751 ("alx: use fine-grained locking instead of RTNL")
Signed-off-by Dan Carpenter <[email protected]>
--- drivers/net/ethernet/atheros/alx/ethtool.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/net/ethernet/atheros/alx/ethtool.c +3 -1
@@ -253,8 +253,10 @@ static int alx_set_pauseparam(struct net_device *netdev,if (reconfig_phy) { err =alx_setup_speed_duplex (hw, hw->adv_cfg, fc); -if (err) +if (err) { +mutex_unlock (&alx->mtx);return err; + } }/* flow control on mac */
Signature · 1 line
2.30.2
Re: [PATCH 2/2 net-next] alx: unlock on error in alx_set_pauseparam()
Quoted 1 line · Dan Carpenter
We need to drop the lock before returning on this error path.
Haha, how many locking errors can I have in a single patch :(
Sorry, and thanks for all the fixes!
johannes