]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
qedr: return -EINVAL if pd is null and avoid null ptr dereference
authorColin Ian King <colin.king@canonical.com>
Tue, 18 Oct 2016 18:39:28 +0000 (19:39 +0100)
committerDoug Ledford <dledford@redhat.com>
Wed, 14 Dec 2016 16:18:17 +0000 (11:18 -0500)
commitea7ef2accdeaf825165cccd60b848765677bf1f2
tree00e3f2b88b75a93163d337e002759dce98563bea
parente37a79e5d4cac3831fac3d4afbf2461f56b4b7bd
qedr: return -EINVAL if pd is null and avoid null ptr dereference

Currently, if pd is null then we hit a null pointer derference
on accessing pd->pd_id.  Instead of just printing an error message
we should also return -EINVAL immediately.

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
drivers/infiniband/hw/qedr/verbs.c