]> git.baikalelectronics.ru Git - kernel.git/commit
MIPS: bpf: Fix is_range() semantics
authorMarkos Chandras <markos.chandras@imgtec.com>
Mon, 23 Jun 2014 09:38:55 +0000 (10:38 +0100)
committerRalf Baechle <ralf@linux-mips.org>
Thu, 26 Jun 2014 09:48:21 +0000 (10:48 +0100)
commite84c990e1444769746897db6d53e5f71f0df3f02
tree13c0ca1332b969d85f472483ae16dce3471c4436
parent96259be060ca25f1ef4c01c2102fd45e6aebc8e8
MIPS: bpf: Fix is_range() semantics

is_range() was meant to check whether the number is within
the s16 range or not. However the return values and consumers expected
the exact opposite. We fix that by inverting the logic in the function
to return 'true' for < s16 and 'false' for > s16.

Signed-off-by: Markos Chandras <markos.chandras@imgtec.com>
Reported-by: Alexei Starovoitov <ast@plumgrid.com>
Cc: David S. Miller <davem@davemloft.net>
Cc: Daniel Borkmann <dborkman@redhat.com>
Cc: Alexei Starovoitov <ast@plumgrid.com>
Cc: netdev@vger.kernel.org
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/7131/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
arch/mips/net/bpf_jit.c