Skip to content
Commit 592ee43f authored by Colin Ian King's avatar Colin Ian King Committed by Alexei Starovoitov
Browse files

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: default avatarColin Ian King <colin.king@canonical.com>
Acked-by: default avatarJakub Kicinski <jakub.kicinski@netronome.com>
Signed-off-by: default avatarAlexei Starovoitov <ast@kernel.org>
parent 29a9c10e
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment