]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
bpf, mips: Fix comment on tail call count limiting
authorTiezhu Yang <yangtiezhu@loongson.cn>
Mon, 11 Oct 2021 01:19:10 +0000 (09:19 +0800)
committerDaniel Borkmann <daniel@iogearbox.net>
Mon, 11 Oct 2021 13:29:38 +0000 (15:29 +0200)
In emit_tail_call() of bpf_jit_comp32.c, "blez t2" (t2 <= 0) is
not consistent with the comment "t2 < 0", update the comment to
keep consistency.

Signed-off-by: Tiezhu Yang <yangtiezhu@loongson.cn>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Acked-by: Johan Almbladh <johan.almbladh@anyfinetworks.com>
Link: https://lore.kernel.org/bpf/1633915150-13220-3-git-send-email-yangtiezhu@loongson.cn
arch/mips/net/bpf_jit_comp32.c

index 9d7041a2e5d732a14ff92d8252e7c1364c5364a0..bd996ede12f8e1cd8ccfe83aa924b7d9ec838b1e 100644 (file)
@@ -1315,7 +1315,7 @@ static int emit_tail_call(struct jit_context *ctx)
        /* if (TCC-- <= 0) goto out */
        emit(ctx, lw, t2, ctx->stack_size, MIPS_R_SP);  /* t2 = *(SP + size) */
        emit_load_delay(ctx);                     /* Load delay slot         */
-       emit(ctx, blez, t2, get_offset(ctx, 1));  /* PC += off(1) if t2 < 0  */
+       emit(ctx, blez, t2, get_offset(ctx, 1));  /* PC += off(1) if t2 <= 0 */
        emit(ctx, addiu, t2, t2, -1);             /* t2-- (delay slot)       */
        emit(ctx, sw, t2, ctx->stack_size, MIPS_R_SP);  /* *(SP + size) = t2 */