Re: [PATCH] bpf: fix divides by zero

2018-01-12 Thread Alexei Starovoitov
On Fri, Jan 12, 2018 at 05:33:26PM -0800, Eric Dumazet wrote: > From: Eric Dumazet > > Divides by zero are not nice, lets avoid them if possible. > > Also do_div() seems not needed when dealing with 32bit operands, > but this seems a minor detail. > > Fixes: bd4cf0ed331a ("net: filter: rework/o

Re: [PATCH] bpf: fix divides by zero

2018-01-12 Thread Eric Dumazet
On Fri, 2018-01-12 at 17:33 -0800, Eric Dumazet wrote: > From: Eric Dumazet > Sorry for the mangled patch. Will send V2

[PATCH] bpf: fix divides by zero

2018-01-12 Thread Eric Dumazet
From: Eric Dumazet Divides by zero are not nice, lets avoid them if possible. Also do_div() seems not needed when dealing with 32bit operands, but this seems a minor detail. Fixes: bd4cf0ed331a ("net: filter: rework/optimize internal BPF interpreter's instruction set") Signed-off-by: Eric Duma