Skip to content
Commit f70968f0 authored by Colin Ian King's avatar Colin Ian King Committed by Jason Gunthorpe
Browse files

i40iw: fix null pointer dereference on a null wqe pointer

Currently the null check for wqe is incorrect and lets a null wqe
be passed to set_64bit_val and this indexes into the null pointer
causing a null pointer dereference.  Fix this by fixing the null
pointer check to return an error if wqe is null.

Link: https://lore.kernel.org/r/20200401224921.405279-1-colin.king@canonical.com
Addresses-Coverity: ("dereference after a null check")
Fixes: 4b34e23f

 ("i40iw: Report correct firmware version")
Signed-off-by: default avatarColin Ian King <colin.king@canonical.com>
Acked-by: default avatarShiraz Saleem <shiraz.saleem@intel.com>
Signed-off-by: default avatarJason Gunthorpe <jgg@mellanox.com>
parent 8f3d9f35
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