UPSTREAM: kcm: use BPF_PROG_RUN
authorSami Tolvanen <samitolvanen@google.com>
Wed, 4 Sep 2019 19:38:57 +0000 (12:38 -0700)
committerCosmin Tanislav <demonsingur@gmail.com>
Thu, 16 May 2024 07:58:22 +0000 (10:58 +0300)
Instead of invoking struct bpf_prog::bpf_func directly, use the
BPF_PROG_RUN macro.

Bug: 140377409
Change-Id: I26abeccc8d25af0f412935ed97aebb5c64f52a2a
(cherry picked from commit a2c11b034142 ("kcm: use BPF_PROG_RUN"))
Signed-off-by: Sami Tolvanen <samitolvanen@google.com>
Acked-by: Yonghong Song <yhs@fb.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
net/kcm/kcmsock.c

index 7b4f3f86586177aff6f667db01681338b2171ae6..407f399b855b203b546fca2ea4dd3f2ad6d7bcc5 100644 (file)
@@ -382,7 +382,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)