All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH -next] IB/usnic: use GFP_ATOMIC under spin lock
@ 2013-12-12  6:49 Wei Yongjun
  0 siblings, 0 replies; only message in thread
From: Wei Yongjun @ 2013-12-12  6:49 UTC (permalink / raw)
  To: umalhi-FYB4Gu1CFyUAvxtiuMwx3w, roland-DgEjT+Ai2ygdnm+yROfE0A,
	sean.hefty-ral2JQCrhuEAvxtiuMwx3w,
	hal.rosenstock-Re5JQEeQqe8AvxtiuMwx3w
  Cc: yongjun_wei-zrsr2BFq86L20UzCJQGyNP8+0UxHXcjY,
	linux-rdma-u79uwXL29TY76Z2rM5mHXA

From: Wei Yongjun <yongjun_wei-zrsr2BFq86L20UzCJQGyNP8+0UxHXcjY@public.gmane.org>

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

Signed-off-by: Wei Yongjun <yongjun_wei-zrsr2BFq86L20UzCJQGyNP8+0UxHXcjY@public.gmane.org>
---
 drivers/infiniband/hw/usnic/usnic_uiom.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/infiniband/hw/usnic/usnic_uiom.c b/drivers/infiniband/hw/usnic/usnic_uiom.c
index c44acbc..d76ea56 100644
--- a/drivers/infiniband/hw/usnic/usnic_uiom.c
+++ b/drivers/infiniband/hw/usnic/usnic_uiom.c
@@ -557,7 +557,7 @@ struct device **usnic_uiom_get_dev_list(struct usnic_uiom_pd *pd)
 	int i = 0;
 
 	spin_lock(&pd->lock);
-	devs = kzalloc(sizeof(*devs)*(pd->dev_cnt + 1), GFP_KERNEL);
+	devs = kzalloc(sizeof(*devs)*(pd->dev_cnt + 1), GFP_ATOMIC);
 	if (!devs) {
 		devs = ERR_PTR(-ENOMEM);
 		goto out;

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2013-12-12  6:49 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-12-12  6:49 [PATCH -next] IB/usnic: use GFP_ATOMIC under spin lock Wei Yongjun

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.