Skip to content
Commit 19fc99d0 authored by Nicolas Schichan's avatar Nicolas Schichan Committed by David S. Miller
Browse files

ARM: net fix emit_udiv() for BPF_ALU | BPF_DIV | BPF_K intruction.



In that case, emit_udiv() will be called with rn == ARM_R0 (r_scratch)
and loading rm first into ARM_R0 will result in jit_udiv() function
being called the same dividend and divisor. Fix that by loading rn
first into ARM_R1 and then rm into ARM_R0.

Signed-off-by: default avatarNicolas Schichan <nschichan@freebox.fr>
Cc: <stable@vger.kernel.org> # v3.13+
Fixes: aee636c4

 (bpf: do not use reciprocal divide)
Acked-by: default avatarMircea Gherzan <mgherzan@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 78f5b899
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment