bpf: fix null pointer dereference on pointer offload
Pointer offload is being null checked however the following statement dereferences the potentially null pointer offload when assigning offload->dev_state. Fix this by only assigning it if offload is not null. Detected by CoverityScan, CID#1475437 ("Dereference after null check") Fixes: 00db12c3 ("bpf: call verifier_prep from its callback in struct bpf_offload_dev") Signed-off-by: NColin Ian King <colin.king@canonical.com> Acked-by: NJakub Kicinski <jakub.kicinski@netronome.com> Signed-off-by: NAlexei Starovoitov <ast@kernel.org>
Showing
想要评论请 注册 或 登录