mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-04 18:09:57 +00:00
accel/habanalabs: call put_pid after hpriv list is updated
Because we might still be using related resources, decrementing PID's reference count should be done at later stages of the device release. A good place is right after the representing private structure is removed from LKD's list. Signed-off-by: Koby Elbaz <kelbaz@habana.ai> Reviewed-by: Oded Gabbay <ogabbay@kernel.org> Signed-off-by: Oded Gabbay <ogabbay@kernel.org>
This commit is contained in:
parent
2b541cf913
commit
942f18c56d
1 changed files with 2 additions and 2 deletions
|
@ -408,8 +408,6 @@ static void hpriv_release(struct kref *ref)
|
|||
|
||||
hdev->asic_funcs->send_device_activity(hdev, false);
|
||||
|
||||
put_pid(hpriv->taskpid);
|
||||
|
||||
hl_debugfs_remove_file(hpriv);
|
||||
|
||||
mutex_destroy(&hpriv->ctx_lock);
|
||||
|
@ -448,6 +446,8 @@ static void hpriv_release(struct kref *ref)
|
|||
list_del(&hpriv->dev_node);
|
||||
mutex_unlock(&hdev->fpriv_list_lock);
|
||||
|
||||
put_pid(hpriv->taskpid);
|
||||
|
||||
if (reset_device) {
|
||||
hl_device_reset(hdev, HL_DRV_RESET_DEV_RELEASE);
|
||||
} else {
|
||||
|
|
Loading…
Reference in a new issue