RDMA/hns: Replace kfree() with kvfree()
[ Upstream commit12d3bbdd6b] Variables allocated by kvmalloc_array() should not be freed by kfree. Because they may be allocated by vmalloc. So we replace kfree() with kvfree() here. Fixes:6fd610c573("RDMA/hns: Support 0 hop addressing for SRQ buffer") Link: https://lore.kernel.org/r/20211210094234.5829-1-billsjc@sjtu.edu.cn Signed-off-by: Jiacheng Shi <billsjc@sjtu.edu.cn> Acked-by: Wenpeng Liang <liangwenpeng@huawei.com> Signed-off-by: Jason Gunthorpe <jgg@nvidia.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
7cf6466e00
commit
579cefef7c
1 changed files with 1 additions and 1 deletions
|
|
@ -277,7 +277,7 @@ static int alloc_srq_wrid(struct hns_roce_dev *hr_dev, struct hns_roce_srq *srq)
|
|||
|
||||
static void free_srq_wrid(struct hns_roce_srq *srq)
|
||||
{
|
||||
kfree(srq->wrid);
|
||||
kvfree(srq->wrid);
|
||||
srq->wrid = NULL;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue