]> git.baikalelectronics.ru Git - kernel.git/commit
taprio: Fix allowing too small intervals
authorVinicius Costa Gomes <vinicius.gomes@intel.com>
Thu, 10 Sep 2020 00:03:11 +0000 (17:03 -0700)
committerDavid S. Miller <davem@davemloft.net>
Sat, 12 Sep 2020 00:21:51 +0000 (17:21 -0700)
commita71587aafc9b5945ae21438a12bc133fb2f17b50
treebf09b66f0c585442a172e368c9cf683282480085
parenta14667e87f18e4cf3461cba09411a54c73a2c4c9
taprio: Fix allowing too small intervals

It's possible that the user specifies an interval that couldn't allow
any packet to be transmitted. This also avoids the issue of the
hrtimer handler starving the other threads because it's running too
often.

The solution is to reject interval sizes that according to the current
link speed wouldn't allow any packet to be transmitted.

Reported-by: syzbot+8267241609ae8c23b248@syzkaller.appspotmail.com
Fixes: 55fb5b5af7a0 ("tc: Add support for configuring the taprio scheduler")
Signed-off-by: Vinicius Costa Gomes <vinicius.gomes@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/sched/sch_taprio.c