]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
habanalabs: don't put context in hl_encaps_handle_do_release_sob()
authorTomer Tayar <ttayar@habana.ai>
Wed, 16 Nov 2022 11:14:02 +0000 (13:14 +0200)
committerOded Gabbay <ogabbay@kernel.org>
Wed, 23 Nov 2022 14:46:29 +0000 (16:46 +0200)
hl_encaps_handle_do_release_sob() can be called only when the last
reference to the context object is released and hl_ctx_do_release() is
initiated, and therefore it shouldn't call hl_ctx_put().

Signed-off-by: Tomer Tayar <ttayar@habana.ai>
Reviewed-by: Oded Gabbay <ogabbay@kernel.org>
Signed-off-by: Oded Gabbay <ogabbay@kernel.org>
drivers/misc/habanalabs/common/context.c

index 2f4620b7990c7d63e7ef84ad435906f0d7a2a9e4..ba6675960203a48bf28b35d9dc9a3e0af63826b4 100644 (file)
@@ -39,7 +39,6 @@ static void hl_encaps_handle_do_release_sob(struct kref *ref)
        idr_remove(&mgr->handles, handle->id);
        spin_unlock(&mgr->lock);
 
-       hl_ctx_put(handle->ctx);
        kfree(handle);
 }