aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/misc
diff options
context:
space:
mode:
authorDani Liberman <dliberman@habana.ai>2022-04-13 21:32:02 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2022-05-22 21:01:18 +0200
commitb0b09b7a8b7d2a015adeb0c66d41f7a28cfc40f2 (patch)
tree0dbd28887534978e445a4e564e6f0dcab7e7d844 /drivers/misc
parenthabanalabs: add prefetch flag to the MAP operation (diff)
downloadlinux-dev-b0b09b7a8b7d2a015adeb0c66d41f7a28cfc40f2.tar.xz
linux-dev-b0b09b7a8b7d2a015adeb0c66d41f7a28cfc40f2.zip
habanalabs: use get_task_pid() to take PID
find_get_pid() isn'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: Dani Liberman <dliberman@habana.ai> Reviewed-by: Oded Gabbay <ogabbay@kernel.org> Signed-off-by: Oded Gabbay <ogabbay@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/misc')
-rw-r--r--drivers/misc/habanalabs/common/habanalabs_drv.c2
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 28549d34d99c..b85ca1e66eb2 100644
--- a/drivers/misc/habanalabs/common/habanalabs_drv.c
+++ b/drivers/misc/habanalabs/common/habanalabs_drv.c
@@ -237,7 +237,7 @@ int hl_device_open_ctrl(struct inode *inode, struct file *filp)
hpriv->filp = filp;
nonseekable_open(inode, filp);
- hpriv->taskpid = find_get_pid(current->pid);
+ hpriv->taskpid = get_task_pid(current, PIDTYPE_PID);
mutex_lock(&hdev->fpriv_ctrl_list_lock);