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

From: Pavel Machek
Date: Wed Sep 01 2021 - 16:09:59 EST


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) <pavel@xxxxxxx>

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

Attachment: signature.asc
Description: PGP signature