From: YueHaibing Date: Mon, 4 Mar 2019 02:56:20 +0000 (+0800) Subject: RDMA/hns: Use GFP_ATOMIC in hns_roce_v2_modify_qp X-Git-Tag: android-x86-9.0-r1~4^2~67^2~63 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=ec2771128eeeeea1d0b3a7bec9998964c7826ce0;p=android-x86%2Fkernel.git RDMA/hns: Use GFP_ATOMIC in hns_roce_v2_modify_qp [ Upstream commit 4e69cf1fe2c52d189acdd06c1fd99cc258aba61f ] The the below commit, hns_roce_v2_modify_qp is called inside spinlock while using GFP_KERNEL. Change it to GFP_ATOMIC. Fixes: 0425e3e6e0c7 ("RDMA/hns: Support flush cqe for hip08 in kernel space") Signed-off-by: YueHaibing Signed-off-by: Jason Gunthorpe Signed-off-by: Sasha Levin --- diff --git a/drivers/infiniband/hw/hns/hns_roce_hw_v2.c b/drivers/infiniband/hw/hns/hns_roce_hw_v2.c index a5ec900a14ae..7021444f18b4 100644 --- a/drivers/infiniband/hw/hns/hns_roce_hw_v2.c +++ b/drivers/infiniband/hw/hns/hns_roce_hw_v2.c @@ -3446,7 +3446,7 @@ static int hns_roce_v2_modify_qp(struct ib_qp *ibqp, struct device *dev = hr_dev->dev; int ret = -EINVAL; - context = kcalloc(2, sizeof(*context), GFP_KERNEL); + context = kcalloc(2, sizeof(*context), GFP_ATOMIC); if (!context) return -ENOMEM;