aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sparc/net/bpf_jit_asm.S
diff options
context:
space:
mode:
Diffstat (limited to 'arch/sparc/net/bpf_jit_asm.S')
-rw-r--r--arch/sparc/net/bpf_jit_asm.S6
1 files changed, 6 insertions, 0 deletions
diff --git a/arch/sparc/net/bpf_jit_asm.S b/arch/sparc/net/bpf_jit_asm.S
index 46d8f59f14c5..9d016c7017f7 100644
--- a/arch/sparc/net/bpf_jit_asm.S
+++ b/arch/sparc/net/bpf_jit_asm.S
@@ -195,5 +195,11 @@ bpf_jit_load_byte_msh_negative_offset:
sll r_OFF, 2, r_X
bpf_error:
+ /* Make the JIT program return zero. The JIT epilogue
+ * stores away the original %o7 into r_saved_O7. The
+ * normal leaf function return is to use "retl" which
+ * would evalute to "jmpl %o7 + 8, %g0" but we want to
+ * use the saved value thus the sequence you see here.
+ */
jmpl r_saved_O7 + 8, %g0
clr %o0