public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH -next] habanalabs: use GFP_ATOMIC under spin lock
@ 2019-02-22  5:46 Wei Yongjun
  2019-02-22  7:04 ` Greg Kroah-Hartman
  0 siblings, 1 reply; 4+ messages in thread
From: Wei Yongjun @ 2019-02-22  5:46 UTC (permalink / raw)
  To: Oded Gabbay, Arnd Bergmann, Greg Kroah-Hartman, Omer Shpigelman
  Cc: Wei Yongjun, linux-kernel, kernel-janitors

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

Fixes: 0feaf86d4e69 ("habanalabs: add virtual memory and MMU modules")
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
---
 drivers/misc/habanalabs/memory.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/misc/habanalabs/memory.c b/drivers/misc/habanalabs/memory.c
index 9236e52852c6..9e3491dc3b55 100644
--- a/drivers/misc/habanalabs/memory.c
+++ b/drivers/misc/habanalabs/memory.c
@@ -120,7 +120,7 @@ static int alloc_device_memory(struct hl_ctx *ctx, struct hl_mem_in *args,
 
 	spin_lock(&vm->idr_lock);
 	handle = idr_alloc(&vm->phys_pg_pack_handles, phys_pg_pack, 1, 0,
-				GFP_KERNEL);
+				GFP_ATOMIC);
 	spin_unlock(&vm->idr_lock);
 
 	if (handle < 0) {




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

end of thread, other threads:[~2019-02-22  7:44 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-02-22  5:46 [PATCH -next] habanalabs: use GFP_ATOMIC under spin lock Wei Yongjun
2019-02-22  7:04 ` Greg Kroah-Hartman
2019-02-22  7:11   ` Oded Gabbay
2019-02-22  7:44     ` Greg Kroah-Hartman

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