mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-06 03:45:24 -04:00
nfp: bpf: Add check for nfp_app_ctrl_msg_alloc()
commit 878e7b11736e062514e58f3b445ff343e6705537 upstream.
Add check for the return value of nfp_app_ctrl_msg_alloc() in
nfp_bpf_cmsg_alloc() to prevent null pointer dereference.
Fixes: ff3d43f756 ("nfp: bpf: implement helpers for FW map ops")
Cc: stable@vger.kernel.org
Signed-off-by: Haoxiang Li <haoxiang_li2024@163.com>
Link: https://patch.msgid.link/20250218030409.2425798-1-haoxiang_li2024@163.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
3eb4911364
commit
d64c6ca420
1 changed files with 2 additions and 0 deletions
|
|
@ -20,6 +20,8 @@ nfp_bpf_cmsg_alloc(struct nfp_app_bpf *bpf, unsigned int size)
|
|||
struct sk_buff *skb;
|
||||
|
||||
skb = nfp_app_ctrl_msg_alloc(bpf->app, size, GFP_KERNEL);
|
||||
if (!skb)
|
||||
return NULL;
|
||||
skb_put(skb, size);
|
||||
|
||||
return skb;
|
||||
|
|
|
|||
Loading…
Reference in a new issue