linux/drivers/infiniband/hw
Michael J. Ruhl b697d7d8c7 IB/hfi1: Fix incorrect mixing of ERR_PTR and NULL return values
The __get_txreq() function can return a pointer, ERR_PTR(-EBUSY), or NULL.
All of the relevant call sites look for IS_ERR, so the NULL return would
lead to a NULL pointer exception.

Do not use the ERR_PTR mechanism for this function.

Update all call sites to handle the return value correctly.

Clean up error paths to reflect return value.

Fixes: 45842abbb2 ("staging/rdma/hfi1: move txreq header code")
Cc: <stable@vger.kernel.org> # 4.9.x+
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: Mike Marciniszyn <mike.marciniszyn@intel.com>
Reviewed-by: Kamenee Arumugam <kamenee.arumugam@intel.com>
Signed-off-by: Michael J. Ruhl <michael.j.ruhl@intel.com>
Signed-off-by: Dennis Dalessandro <dennis.dalessandro@intel.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
2018-06-26 14:35:55 -06:00
..
bnxt_re RDMA/bnxt_re: Fix broken RoCE driver due to recent L2 driver changes 2018-05-25 11:03:47 -06:00
cxgb3 treewide: kzalloc() -> kcalloc() 2018-06-12 16:19:22 -07:00
cxgb4 iw_cxgb4: correctly enforce the max reg_mr depth 2018-06-25 15:27:51 -06:00
hfi1 IB/hfi1: Fix incorrect mixing of ERR_PTR and NULL return values 2018-06-26 14:35:55 -06:00
hns treewide: Use array_size() in vzalloc() 2018-06-12 16:19:22 -07:00
i40iw Merge branch 'mr_fix' into git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma for-next 2018-05-28 11:44:35 -06:00
mlx4 4.18-rc 2018-06-21 07:22:30 +09:00
mlx5 4.18-rc 2018-06-21 07:22:30 +09:00
mthca treewide: kzalloc() -> kcalloc() 2018-06-12 16:19:22 -07:00
nes treewide: kzalloc() -> kcalloc() 2018-06-12 16:19:22 -07:00
ocrdma treewide: kzalloc() -> kcalloc() 2018-06-12 16:19:22 -07:00
qedr 4.18-rc 2018-06-21 07:22:30 +09:00
qib treewide: Use array_size() in vzalloc() 2018-06-12 16:19:22 -07:00
usnic treewide: kzalloc() -> kcalloc() 2018-06-12 16:19:22 -07:00
vmw_pvrdma RDMA: Use ib_gid_attr during GID modification 2018-04-03 21:34:16 -06:00
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00