habanalabs: use GFP_ATOMIC under spin lock
A spin lock is taken here so we should use GFP_ATOMIC.
Fixes: 0feaf86d4e
("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>
This commit is contained in:
parent
6ade6e903a
commit
668ae7288e
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user