aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorWen Yang <wenyang@linux.alibaba.com>2020-01-02 17:21:43 +0800
committerDavid S. Miller <davem@davemloft.net>2020-01-02 16:34:28 -0800
commit68aab823c223646fab311f8a6581994facee66a0 (patch)
treeb0ca5b68fbeda17f190305cdae73670591f7887a /drivers
parentnet: Correct type of tcp_syncookies sysctl. (diff)
downloadlinux-dev-68aab823c223646fab311f8a6581994facee66a0.tar.xz
linux-dev-68aab823c223646fab311f8a6581994facee66a0.zip
sch_cake: avoid possible divide by zero in cake_enqueue()
The variables 'window_interval' is u64 and do_div() truncates it to 32 bits, which means it can test non-zero and be truncated to zero for division. The unit of window_interval is nanoseconds, so its lower 32-bit is relatively easy to exceed. Fix this issue by using div64_u64() instead. Fixes: 7298de9cd725 ("sch_cake: Add ingress mode") Signed-off-by: Wen Yang <wenyang@linux.alibaba.com> Cc: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk> Cc: Toke Høiland-Jørgensen <toke@redhat.com> Cc: David S. Miller <davem@davemloft.net> Cc: Cong Wang <xiyou.wangcong@gmail.com> Cc: cake@lists.bufferbloat.net Cc: netdev@vger.kernel.org Cc: linux-kernel@vger.kernel.org Acked-by: Toke Høiland-Jørgensen <toke@toke.dk> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers')
0 files changed, 0 insertions, 0 deletions