Skip to content

Commit

Permalink
kcm: use BPF_PROG_RUN
Browse files Browse the repository at this point in the history
Instead of invoking struct bpf_prog::bpf_func directly, use the
BPF_PROG_RUN macro.

Signed-off-by: Sami Tolvanen <samitolvanen@google.com>
Acked-by: Yonghong Song <yhs@fb.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
  • Loading branch information
Sami Tolvanen authored and Alexei Starovoitov committed Sep 6, 2019
1 parent 8f6e19a commit a2c11b0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion net/kcm/kcmsock.c
Original file line number Diff line number Diff line change
Expand Up @@ -379,7 +379,7 @@ static int kcm_parse_func_strparser(struct strparser *strp, struct sk_buff *skb)
struct kcm_psock *psock = container_of(strp, struct kcm_psock, strp);
struct bpf_prog *prog = psock->bpf_prog;

return (*prog->bpf_func)(skb, prog->insnsi);
return BPF_PROG_RUN(prog, skb);
}

static int kcm_read_sock_done(struct strparser *strp, int err)
Expand Down

0 comments on commit a2c11b0

Please sign in to comment.