* [PATCH] net: mscc: ocelot: fix mutex_lock not released
@ 2021-11-30 11:24 cgel.zte
2021-11-30 12:40 ` patchwork-bot+netdevbpf
0 siblings, 1 reply; 2+ messages in thread
From: cgel.zte @ 2021-11-30 11:24 UTC (permalink / raw)
To: vladimir.oltean
Cc: claudiu.manoil, alexandre.belloni, UNGLinuxDriver, davem, kuba,
netdev, linux-kernel, Lv Ruyi, Zeal Robot
From: Lv Ruyi <lv.ruyi@zte.com.cn>
If err is true, the function will be returned, but mutex_lock isn't
released.
Reported-by: Zeal Robot <zealci@zte.com.cn>
Signed-off-by: Lv Ruyi <lv.ruyi@zte.com.cn>
---
drivers/net/ethernet/mscc/ocelot.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/mscc/ocelot.c b/drivers/net/ethernet/mscc/ocelot.c
index fe8abb30f185..b1856d8c944b 100644
--- a/drivers/net/ethernet/mscc/ocelot.c
+++ b/drivers/net/ethernet/mscc/ocelot.c
@@ -1651,8 +1651,10 @@ int ocelot_hwstamp_set(struct ocelot *ocelot, int port, struct ifreq *ifr)
}
err = ocelot_setup_ptp_traps(ocelot, port, l2, l4);
- if (err)
+ if (err) {
+ mutex_unlock(&ocelot->ptp_lock);
return err;
+ }
if (l2 && l4)
cfg.rx_filter = HWTSTAMP_FILTER_PTP_V2_EVENT;
--
2.25.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] net: mscc: ocelot: fix mutex_lock not released
2021-11-30 11:24 [PATCH] net: mscc: ocelot: fix mutex_lock not released cgel.zte
@ 2021-11-30 12:40 ` patchwork-bot+netdevbpf
0 siblings, 0 replies; 2+ messages in thread
From: patchwork-bot+netdevbpf @ 2021-11-30 12:40 UTC (permalink / raw)
To: luo penghao
Cc: vladimir.oltean, claudiu.manoil, alexandre.belloni,
UNGLinuxDriver, davem, kuba, netdev, linux-kernel, lv.ruyi,
zealci
Hello:
This patch was applied to netdev/net-next.git (master)
by David S. Miller <davem@davemloft.net>:
On Tue, 30 Nov 2021 11:24:43 +0000 you wrote:
> From: Lv Ruyi <lv.ruyi@zte.com.cn>
>
> If err is true, the function will be returned, but mutex_lock isn't
> released.
>
> Reported-by: Zeal Robot <zealci@zte.com.cn>
> Signed-off-by: Lv Ruyi <lv.ruyi@zte.com.cn>
>
> [...]
Here is the summary with links:
- net: mscc: ocelot: fix mutex_lock not released
https://git.kernel.org/netdev/net-next/c/9c32950f24f9
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-11-30 12:40 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-30 11:24 [PATCH] net: mscc: ocelot: fix mutex_lock not released cgel.zte
2021-11-30 12:40 ` patchwork-bot+netdevbpf
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.