net: stmmac: Add check for taprio basetime configuration
Adds a boundary check to prevent negative basetime input from user while configuring taprio. Signed-off-by: Michael Sit Wei Hong <michael.wei.hong.sit@intel.com> Signed-off-by: Lai Peter Jun Ann <jun.ann.lai@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
93c60b5974
commit
6d534ee057
@ -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;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user