# Re: \[PATCH 5.10 047/103\] net: stmmac: add mutex lock to protect est parameters

- From: Pavel Machek \<hidden\>
- Date: 2021-09-01 20:09:59 
- List: stable
- Page: https://ratatoskr.run/stable/2021/09/1495109
- Thread: https://ratatoskr.run/stable/2021/09/1494535/t/2.md

```text
Hi!

> [ Upstream commit b2aae654a4794ef898ad33a179f341eb610f6b85 ]
> 
> Add a mutex lock to protect est structure parameters so that the
> EST parameters can be updated by other threads.

Mainline version of the patch is okay, but I believe we need one more
mutex_unlock in 5.10.

Signed-off-by: Pavel Machek (CIP) <redacted>

diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_tc.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_tc.c
index 22c34474e617..639980306115 100644
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_tc.c
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_tc.c
@@ -765,6 +765,7 @@ static int tc_setup_taprio(struct stmmac_priv *priv,
 				   priv->plat->tx_queues_to_use,
 				   priv->plat->rx_queues_to_use, fpe);
 	if (ret && fpe) {
+		mutex_unlock(&priv->plat->est->lock);
 		netdev_err(priv->dev, "failed to enable Frame Preemption\n");
 		return ret;
 	}

Best regards,
								Pavel
-- 
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
```

## Attachments

- [signature.asc](https://ratatoskr.run/stable/2021/09/1495109/attachment/0) (application/pgp-signature, 195 bytes)
