Patch "net: stmmac: fix missing unlock on error in stmmac_suspend()" has been added to the 5.10-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    net: stmmac: fix missing unlock on error in stmmac_suspend()

to the 5.10-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     net-stmmac-fix-missing-unlock-on-error-in-stmmac_suspend.patch
and it can be found in the queue-5.10 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.


>From foo@baz Fri Nov 19 02:27:53 PM CET 2021
From: Meng Li <Meng.Li@xxxxxxxxxxxxx>
Date: Fri, 19 Nov 2021 10:53:56 +0800
Subject: net: stmmac: fix missing unlock on error in stmmac_suspend()
To: stable@xxxxxxxxxxxxxxx, davem@xxxxxxxxxxxxx, kuba@xxxxxxxxxx, mcoquelin.stm32@xxxxxxxxx, linux@xxxxxxxxxxxxxxx, andrew@xxxxxxx, qiangqing.zhang@xxxxxxx
Cc: linux-kernel@xxxxxxxxxxxxxxx, netdev@xxxxxxxxxxxxxxx, meng.li@xxxxxxxxxxxxx
Message-ID: <20211119025359.30815-4-Meng.Li@xxxxxxxxxxxxx>

From: Yang Yingliang <yangyingliang@xxxxxxxxxx>

commit 30f347ae7cc1178c431f968a89d4b4a375bc0d39 upstream

Add the missing unlock before return from stmmac_suspend()
in the error handling case.

Fixes: 5ec55823438e ("net: stmmac: add clocks management for gmac driver")
Reported-by: Hulk Robot <hulkci@xxxxxxxxxx>
Signed-off-by: Yang Yingliang <yangyingliang@xxxxxxxxxx>
Signed-off-by: David S. Miller <davem@xxxxxxxxxxxxx>
Signed-off-by: Meng Li <Meng.Li@xxxxxxxxxxxxx>
Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
---
 drivers/net/ethernet/stmicro/stmmac/stmmac_main.c |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
@@ -5275,8 +5275,10 @@ int stmmac_suspend(struct device *dev)
 		/* Disable clock in case of PWM is off */
 		clk_disable_unprepare(priv->plat->clk_ptp_ref);
 		ret = pm_runtime_force_suspend(dev);
-		if (ret)
+		if (ret) {
+			mutex_unlock(&priv->lock);
 			return ret;
+		}
 	}
 	mutex_unlock(&priv->lock);
 


Patches currently in stable-queue which might be from Meng.Li@xxxxxxxxxxxxx are

queue-5.10/net-stmmac-fix-missing-unlock-on-error-in-stmmac_suspend.patch
queue-5.10/net-stmmac-fix-system-hang-if-change-mac-address-after-interface-ifdown.patch
queue-5.10/net-stmmac-dwmac-rk-fix-unbalanced-pm_runtime_enable-warnings.patch
queue-5.10/net-stmmac-fix-issue-where-clk-is-being-unprepared-twice.patch
queue-5.10/net-stmmac-add-clocks-management-for-gmac-driver.patch
queue-5.10/net-stmmac-platform-fix-build-error-with-config_pm_sleep.patch



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux