[PATCH] sch_cake: avoid possible divide by zero in cake_enqueue()
Toke Høiland-Jørgensen
toke at toke.dk
Thu Jan 2 18:34:01 EST 2020
Wen Yang <wenyang at linux.alibaba.com> writes:
> 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 at linux.alibaba.com>
> Cc: Kevin Darbyshire-Bryant <ldir at darbyshire-bryant.me.uk>
> Cc: Toke Høiland-Jørgensen <toke at redhat.com>
> Cc: David S. Miller <davem at davemloft.net>
> Cc: Cong Wang <xiyou.wangcong at gmail.com>
> Cc: cake at lists.bufferbloat.net
> Cc: netdev at vger.kernel.org
> Cc: linux-kernel at vger.kernel.org
Acked-by: Toke Høiland-Jørgensen <toke at toke.dk>
More information about the Cake
mailing list