* [PATCH -next] RDMA/hns: Use GFP_ATOMIC in hns_roce_v2_modify_qp
@ 2019-03-04 2:56 Yue Haibing
2019-03-04 20:25 ` Jason Gunthorpe
0 siblings, 1 reply; 2+ messages in thread
From: Yue Haibing @ 2019-03-04 2:56 UTC (permalink / raw)
To: oulijun, xavier.huwei, dledford, jgg; +Cc: linux-kernel, linux-rdma, YueHaibing
From: YueHaibing <yuehaibing@huawei.com>
In commit 0425e3e6e0c7, hns_roce_v2_modify_qp called inside
spinlock which using GFP_KERNEL, it may sleep with holding
the spinlock, so we should use GFP_ATOMIC instead.
Fixes: 0425e3e6e0c7 ("RDMA/hns: Support flush cqe for hip08 in kernel space")
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
---
drivers/infiniband/hw/hns/hns_roce_hw_v2.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/infiniband/hw/hns/hns_roce_hw_v2.c b/drivers/infiniband/hw/hns/hns_roce_hw_v2.c
index 8795266..1c54390 100644
--- a/drivers/infiniband/hw/hns/hns_roce_hw_v2.c
+++ b/drivers/infiniband/hw/hns/hns_roce_hw_v2.c
@@ -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;
--
2.7.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH -next] RDMA/hns: Use GFP_ATOMIC in hns_roce_v2_modify_qp
2019-03-04 2:56 [PATCH -next] RDMA/hns: Use GFP_ATOMIC in hns_roce_v2_modify_qp Yue Haibing
@ 2019-03-04 20:25 ` Jason Gunthorpe
0 siblings, 0 replies; 2+ messages in thread
From: Jason Gunthorpe @ 2019-03-04 20:25 UTC (permalink / raw)
To: Yue Haibing; +Cc: oulijun, xavier.huwei, dledford, linux-kernel, linux-rdma
On Mon, Mar 04, 2019 at 10:56:20AM +0800, Yue Haibing wrote:
> From: YueHaibing <yuehaibing@huawei.com>
>
> In commit 0425e3e6e0c7, hns_roce_v2_modify_qp called inside
> spinlock which using GFP_KERNEL, it may sleep with holding
> the spinlock, so we should use GFP_ATOMIC instead.
>
> Fixes: 0425e3e6e0c7 ("RDMA/hns: Support flush cqe for hip08 in kernel space")
> Signed-off-by: YueHaibing <yuehaibing@huawei.com>
> drivers/infiniband/hw/hns/hns_roce_hw_v2.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
Applied to for-next, thanks
Jason
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-03-04 20:25 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-03-04 2:56 [PATCH -next] RDMA/hns: Use GFP_ATOMIC in hns_roce_v2_modify_qp Yue Haibing
2019-03-04 20:25 ` Jason Gunthorpe
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).