mirror of
https://git.proxmox.com/git/mirror_ubuntu-kernels.git
synced 2025-12-26 19:12:39 +00:00
RDMA/hns: Fix double free of the pointer to TSQ/TPQ
A return statement is omitted after getting HEM table, then the newly
allocated pointer will be freed directly, which will cause a calltrace
when the driver was removed.
Fixes: d6d91e4621 ("RDMA/hns: Add support for configuring GMV table")
Link: https://lore.kernel.org/r/1605180582-46504-1-git-send-email-liweihang@huawei.com
Signed-off-by: Weihang Li <liweihang@huawei.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
This commit is contained in:
parent
22dd4c7076
commit
7af80c02c7
@ -2582,6 +2582,8 @@ static int hns_roce_v2_init(struct hns_roce_dev *hr_dev)
|
||||
if (ret)
|
||||
goto err_get_hem_table_failed;
|
||||
|
||||
return 0;
|
||||
|
||||
err_get_hem_table_failed:
|
||||
hns_roce_free_link_table(hr_dev, &priv->tpq);
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user