diff options
author | Oded Gabbay <ogabbay@kernel.org> | 2021-07-03 11:50:32 +0300 |
---|---|---|
committer | Oded Gabbay <ogabbay@kernel.org> | 2021-08-29 09:47:45 +0300 |
commit | e79e745b208b3c709cc5e689e587d04a4c0fe1bb (patch) | |
tree | 986e6ed83f64bf48014447a4d60a345085953325 /drivers/misc/habanalabs/common/habanalabs_drv.c | |
parent | fbcd0efefc7e32f2acb9ca5d9196306dfa3da880 (diff) | |
download | linux-e79e745b208b3c709cc5e689e587d04a4c0fe1bb.tar.bz2 |
habanalabs: use get_task_pid() to take PID
The previous function we used, find_get_pid(), wasn't good in case
the user process was run inside docker.
As a result, we didn't had the PID and we couldn't kill the user
process in case the device got stuck and we needed to reset the
device.
Signed-off-by: Oded Gabbay <ogabbay@kernel.org>
Diffstat (limited to 'drivers/misc/habanalabs/common/habanalabs_drv.c')
-rw-r--r-- | drivers/misc/habanalabs/common/habanalabs_drv.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/misc/habanalabs/common/habanalabs_drv.c b/drivers/misc/habanalabs/common/habanalabs_drv.c index 4194cda2d04c..bffca119946b 100644 --- a/drivers/misc/habanalabs/common/habanalabs_drv.c +++ b/drivers/misc/habanalabs/common/habanalabs_drv.c @@ -141,7 +141,7 @@ int hl_device_open(struct inode *inode, struct file *filp) hl_cb_mgr_init(&hpriv->cb_mgr); hl_ctx_mgr_init(&hpriv->ctx_mgr); - hpriv->taskpid = find_get_pid(current->pid); + hpriv->taskpid = get_task_pid(current, PIDTYPE_PID); mutex_lock(&hdev->fpriv_list_lock); |