]> git.baikalelectronics.ru Git - kernel.git/commit
IB/hfi1: Prevent null pointer dereference
authorIra Weiny <ira.weiny@intel.com>
Thu, 28 Jul 2016 19:21:12 +0000 (15:21 -0400)
committerDoug Ledford <dledford@redhat.com>
Wed, 3 Aug 2016 02:46:21 +0000 (22:46 -0400)
commit0efb4b7956a9de47f75b5444a10effe897db45e6
treed693acb239cf1e977333da876a912c38ed16943f
parenta55725a6b3b21a6bf9e095ee48d4a9aabc2730dd
IB/hfi1: Prevent null pointer dereference

If a context has not been assigned or assignment failed, pq may be NULL.
Move the unregister within the protection of the null check.

Reviewed-by: Dean Luick <dean.luick@intel.com>
Signed-off-by: Ira Weiny <ira.weiny@intel.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
drivers/infiniband/hw/hfi1/user_sdma.c