linux/drivers/infiniband
Dan Carpenter cac2a301c0 RDMA/uverbs: check for allocation failure in uapi_add_elm()
If the kzalloc() fails then we should return ERR_PTR(-ENOMEM).  In the
current code it's possible that the kzalloc() fails and the
radix_tree_insert() inserts the NULL pointer successfully and we return
the NULL "elm" pointer to the caller.  That results in a NULL pointer
dereference.

Fixes: 9ed3e5f447 ("IB/uverbs: Build the specs into a radix tree at runtime")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
2019-05-30 15:45:58 -03:00
..
core RDMA/uverbs: check for allocation failure in uapi_add_elm() 2019-05-30 15:45:58 -03:00
hw IB/hfi1: Use struct_size() helper 2019-05-30 15:40:50 -03:00
sw IB/rdmavt: Use struct_size() helper 2019-05-30 15:40:50 -03:00
ulp RDMA/ipoib: Remove check of destroy CQ 2019-05-21 15:50:53 -03:00
Kconfig 5.2 Merge Window pull request 2019-05-09 09:02:46 -07:00
Makefile