1
0
Fork 0
alistair23-linux/drivers/infiniband
Dan Carpenter 92c9919781 RDMA/cm: Fix an error check in cm_alloc_id_priv()
commit 9836535158 upstream.

The xa_alloc_cyclic_irq() function returns either 0 or 1 on success and
negatives on error.  This code treats 1 as an error and returns ERR_PTR(1)
which will cause an Oops in the caller.

Fixes: ae78ff3a0f ("RDMA/cm: Convert local_id_table to XArray")
Link: https://lore.kernel.org/r/20200407093714.GA80285@mwanda
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-05-06 08:15:13 +02:00
..
core RDMA/cm: Fix an error check in cm_alloc_id_priv() 2020-05-06 08:15:13 +02:00
hw RDMA/mlx4: Initialize ib_spec on the stack 2020-05-06 08:15:12 +02:00
sw RDMA/siw: Fix potential siw_mem refcnt leak in siw_fastreg_mr() 2020-05-06 08:15:12 +02:00
ulp scsi: Revert "RDMA/isert: Fix a recently introduced regression related to logout" 2020-02-28 17:22:25 +01:00
Kconfig RDMA/odp: Use the common interval tree library instead of generic 2019-08-21 13:34:09 -03:00
Makefile treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00