[PATCH linux-next -mm] ARM: bpf_jit: seccomp filtering: fixup merge conflict

From: Daniel Borkmann
Date: Fri Apr 26 2013 - 17:41:06 EST


Commit e4c67f4c0479d8e3cb0 (ARM: net: bpf_jit: make code generation
less dependent on struct sk_filter.) caused a merge conflict with
commit 79617801ea0c0e6 (filter: bpf_jit_comp: refactor and unify
BPF JIT image dump output) resulting in a build failure:

arch/arm/net/bpf_jit_32.c: In function '__bpf_jit_compile':
arch/arm/net/bpf_jit_32.c:930:16: error: 'fp' undeclared (first use in this function)
bpf_jit_dump(fp->len, alloc_size, 2, ctx.target);

Fix this up by using ctx.prog_len that is being set before we enter
__bpf_jit_compile().

Reported-by: Arnd Bergmann <arnd@xxxxxxxx>
Cc: Nicolas Schichan <nschichan@xxxxxxxxxx>
Signed-off-by: Daniel Borkmann <dborkman@xxxxxxxxxx>
---
arch/arm/net/bpf_jit_32.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm/net/bpf_jit_32.c b/arch/arm/net/bpf_jit_32.c
index c5ef845..eb4daba 100644
--- a/arch/arm/net/bpf_jit_32.c
+++ b/arch/arm/net/bpf_jit_32.c
@@ -927,7 +927,7 @@ static void __bpf_jit_compile(struct jit_ctx *out_ctx)

if (bpf_jit_enable > 1)
/* there are 2 passes here */
- bpf_jit_dump(fp->len, alloc_size, 2, ctx.target);
+ bpf_jit_dump(ctx.prog_len, alloc_size, 2, ctx.target);
out:
kfree(ctx.offsets);

--
1.7.11.7


--------------080108090705060902020509--
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/