public inbox for linux-rdma@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH -next] RDMA/hns: Use GFP_ATOMIC under spin lock
@ 2021-04-07 15:49 Wei Yongjun
  2021-04-07 23:32 ` Jason Gunthorpe
  0 siblings, 1 reply; 2+ messages in thread
From: Wei Yongjun @ 2021-04-07 15:49 UTC (permalink / raw)
  To: weiyongjun1, Yangyang Li, Lijun Ou, Weihang Li, Doug Ledford,
	Jason Gunthorpe
  Cc: linux-rdma, kernel-janitors, Hulk Robot

A spin lock is taken here so we should use GFP_ATOMIC.

Fixes: f91696f2f053 ("RDMA/hns: Support congestion control type selection according to the FW")
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Wei Yongjun <weiyongjun1@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 1213f4011dd1..0312d383d49e 100644
--- a/drivers/infiniband/hw/hns/hns_roce_hw_v2.c
+++ b/drivers/infiniband/hw/hns/hns_roce_hw_v2.c
@@ -4623,7 +4623,7 @@ static int get_dip_ctx_idx(struct ib_qp *ibqp, const struct ib_qp_attr *attr,
 	/* If no dgid is found, a new dip and a mapping between dgid and
 	 * dip_idx will be created.
 	 */
-	hr_dip = kzalloc(sizeof(*hr_dip), GFP_KERNEL);
+	hr_dip = kzalloc(sizeof(*hr_dip), GFP_ATOMIC);
 	if (!hr_dip) {
 		ret = -ENOMEM;
 		goto out;


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-04-07 23:32 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-04-07 15:49 [PATCH -next] RDMA/hns: Use GFP_ATOMIC under spin lock Wei Yongjun
2021-04-07 23:32 ` Jason Gunthorpe

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox