2022-12-08 09:30:59

by Lai Peter Jun Ann

[permalink] [raw]
Subject: [PATCH net-next 1/1] net: stmmac: Add check for taprio basetime configuration

From: Michael Sit Wei Hong <[email protected]>

Adds a boundary check to prevent negative basetime input from user
while configuring taprio.

Signed-off-by: Michael Sit Wei Hong <[email protected]>
Signed-off-by: Lai Peter Jun Ann <[email protected]>
---
drivers/net/ethernet/stmicro/stmmac/stmmac_tc.c | 3 +++
1 file changed, 3 insertions(+)

diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_tc.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_tc.c
index 773e415..2cfb18c 100644
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_tc.c
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_tc.c
@@ -926,6 +926,9 @@ static int tc_setup_taprio(struct stmmac_priv *priv,
int i, ret = 0;
u64 ctr;

+ if (qopt->base_time < 0)
+ return -ERANGE;
+
if (!priv->dma_cap.estsel)
return -EOPNOTSUPP;

--
1.9.1


2022-12-12 09:55:22

by patchwork-bot+netdevbpf

[permalink] [raw]
Subject: Re: [PATCH net-next 1/1] net: stmmac: Add check for taprio basetime configuration

Hello:

This patch was applied to netdev/net-next.git (master)
by David S. Miller <[email protected]>:

On Thu, 8 Dec 2022 17:03:15 +0800 you wrote:
> From: Michael Sit Wei Hong <[email protected]>
>
> Adds a boundary check to prevent negative basetime input from user
> while configuring taprio.
>
> Signed-off-by: Michael Sit Wei Hong <[email protected]>
> Signed-off-by: Lai Peter Jun Ann <[email protected]>
>
> [...]

Here is the summary with links:
- [net-next,1/1] net: stmmac: Add check for taprio basetime configuration
https://git.kernel.org/netdev/net-next/c/6d534ee057b6

You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html