Commit ec277112 authored by YueHaibing's avatar YueHaibing Committed by Greg Kroah-Hartman

RDMA/hns: Use GFP_ATOMIC in hns_roce_v2_modify_qp

[ Upstream commit 4e69cf1f ]

The the below commit, hns_roce_v2_modify_qp is called inside spinlock
while using GFP_KERNEL. Change it to GFP_ATOMIC.

Fixes: 0425e3e6 ("RDMA/hns: Support flush cqe for hip08 in kernel space")
Signed-off-by: default avatarYueHaibing <yuehaibing@huawei.com>
Signed-off-by: default avatarJason Gunthorpe <jgg@mellanox.com>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent cc84d7b1
...@@ -3446,7 +3446,7 @@ static int hns_roce_v2_modify_qp(struct ib_qp *ibqp, ...@@ -3446,7 +3446,7 @@ static int hns_roce_v2_modify_qp(struct ib_qp *ibqp,
struct device *dev = hr_dev->dev; struct device *dev = hr_dev->dev;
int ret = -EINVAL; int ret = -EINVAL;
context = kcalloc(2, sizeof(*context), GFP_KERNEL); context = kcalloc(2, sizeof(*context), GFP_ATOMIC);
if (!context) if (!context)
return -ENOMEM; return -ENOMEM;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment