linux/drivers/infiniband
Weihang Li 783cf673b0 RDMA/hns: Fix memory corruption when allocating XRCDN
It's incorrect to cast the type of pointer to xrcdn from (u32 *) to
(unsigned long *), then pass it into hns_roce_bitmap_alloc(), this will
lead to a memory corruption.

Fixes: 32548870d4 ("RDMA/hns: Add support for XRC on HIP09")
Link: https://lore.kernel.org/r/1616381069-51759-1-git-send-email-liweihang@huawei.com
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Weihang Li <liweihang@huawei.com>
Reviewed-by: Leon Romanovsky <leonro@nvidia.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
2021-03-22 21:46:37 -03:00
..
core RDMA/cma: Remove unused leftovers in cma code 2021-03-22 09:31:28 -03:00
hw RDMA/hns: Fix memory corruption when allocating XRCDN 2021-03-22 21:46:37 -03:00
sw RDMA: Delete not-used static inline functions 2021-03-22 09:31:19 -03:00
ulp RDMA/rtrs-clt: Use rdma_event_msg in log 2021-03-11 14:50:41 -04:00
Kconfig RDMA/umem: Support importing dma-buf as user memory region 2021-01-20 16:07:52 -04:00
Makefile treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00