mirror of
https://github.com/raspberrypi/linux.git
synced 2025-12-06 01:49:46 +00:00
igc: Add checking for basetime less than zero
[ Upstream commit3b61764fb4] Using the tc qdisc command, the user can set basetime to any value. Checking should be done on the driver's side to prevent registering basetime values that are less than zero. Fixes:ec50a9d437("igc: Add support for taprio offloading") Signed-off-by: Muhammad Husaini Zulkifli <muhammad.husaini.zulkifli@intel.com> Tested-by: Naama Meir <naamax.meir@linux.intel.com> Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
3d1d5bdb9f
commit
cb2f9d9dd0
@@ -6003,6 +6003,9 @@ static int igc_save_qbv_schedule(struct igc_adapter *adapter,
|
||||
if (!qopt->enable)
|
||||
return igc_tsn_clear_schedule(adapter);
|
||||
|
||||
if (qopt->base_time < 0)
|
||||
return -ERANGE;
|
||||
|
||||
if (adapter->base_time)
|
||||
return -EALREADY;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user