summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWei Yongjun <weiyongjun1@huawei.com>2019-02-22 05:46:01 +0000
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-02-22 08:45:40 +0100
commit668ae7288e82aa8e7f7cc40b8e13248305d752e7 (patch)
tree109d673755f63a6ac8d2bb60e73e51a987a05876
parent6ade6e903ad602b85cef0b40920415b2fed07f6b (diff)
habanalabs: use GFP_ATOMIC under spin lock
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> Reviewed-by: Oded Gabbay <oded.gabbay@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/misc/habanalabs/memory.c2
1 files changed, 1 insertions, 1 deletions
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) {