diff options
author | 2021-03-22 10:44:29 +0800 | |
---|---|---|
committer | 2021-03-22 21:46:37 -0300 | |
commit | 783cf673b05ebf290317f583ee7eb6967ed9c964 (patch) | |
tree | 1bc353c050e00b4a9c2fc4773a14b86d09f37990 /drivers/infiniband/core/device.c | |
parent | IB/hns: Fix mispelling of subsystem (diff) | |
download | wireguard-linux-783cf673b05ebf290317f583ee7eb6967ed9c964.tar.xz wireguard-linux-783cf673b05ebf290317f583ee7eb6967ed9c964.zip |
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: 32548870d438 ("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>
Diffstat (limited to 'drivers/infiniband/core/device.c')
0 files changed, 0 insertions, 0 deletions