commit | c366287ebd698ef5e3de300d90cd62ee9ee7373e | [log] [tgz] |
---|---|---|
author | Eric Dumazet <edumazet@google.com> | Fri Jan 12 17:43:23 2018 -0800 |
committer | Alexei Starovoitov <ast@kernel.org> | Sun Jan 14 09:03:43 2018 -0800 |
tree | db24f872f9e1d05b43387b4480914ad8f5ee78b7 | |
parent | 8155aedf512edd3f88ef19f7cacf476ace7d1322 [diff] |
bpf: fix divides by zero 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 Dumazet <edumazet@google.com> Reported-by: syzbot <syzkaller@googlegroups.com> Signed-off-by: Alexei Starovoitov <ast@kernel.org>