]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
RDMA/hns: Use GFP_ATOMIC in hns_roce_v2_modify_qp
authorYueHaibing <yuehaibing@huawei.com>
Mon, 4 Mar 2019 02:56:20 +0000 (10:56 +0800)
committerJason Gunthorpe <jgg@mellanox.com>
Mon, 4 Mar 2019 20:41:30 +0000 (16:41 -0400)
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 <yuehaibing@huawei.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
drivers/infiniband/hw/hns/hns_roce_hw_v2.c

index 8795266881fb05186175c28b67e884004dcff5e7..1c54390e1c854568f6c1d76c673838bdad8ebe71 100644 (file)
@@ -4027,7 +4027,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;