linux/drivers/infiniband
Jiasheng Jiang 7694a7de22 RDMA/uverbs: Check for null return of kmalloc_array
Because of the possible failure of the allocation, data might be NULL
pointer and will cause the dereference of the NULL pointer later.
Therefore, it might be better to check it and return -ENOMEM.

Fixes: 6884c6c4bd ("RDMA/verbs: Store the write/write_ex uapi entry points in the uverbs_api")
Link: https://lore.kernel.org/r/20211231093315.1917667-1-jiasheng@iscas.ac.cn
Signed-off-by: Jiasheng Jiang <jiasheng@iscas.ac.cn>
Reviewed-by: Leon Romanovsky <leonro@nvidia.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
2022-01-05 14:16:53 -04:00
..
core RDMA/uverbs: Check for null return of kmalloc_array 2022-01-05 14:16:53 -04:00
hw Revert "RDMA/mlx5: Fix releasing unallocated memory in dereg MR flow" 2022-01-05 09:04:30 -04:00
sw RDMA/rxe: Prevent double freeing rxe_map_set() 2022-01-04 10:29:34 -04:00
ulp RDMA/rtrs: Call {get,put}_cpu_ptr to silence a debug kernel warning 2021-11-29 10:56:18 -04:00
Kconfig RDMA/irdma: Add irdma Kconfig/Makefile and remove i40iw 2021-06-02 20:06:36 -03:00
Makefile treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00