Re: [PATCH v2] bpf: fix divides by zero

2018-01-14 Thread Alexei Starovoitov
On Fri, Jan 12, 2018 at 05:43:23PM -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

[PATCH v2] 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")