From: Dani Liberman Date: Wed, 13 Apr 2022 18:32:02 +0000 (+0300) Subject: habanalabs: use get_task_pid() to take PID X-Git-Tag: v5.19-rc1~45^2~18 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=b0b09b7a8b7d2a015adeb0c66d41f7a28cfc40f2;p=thirdparty%2Fkernel%2Flinux.git 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 Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/misc/habanalabs/common/habanalabs_drv.c b/drivers/misc/habanalabs/common/habanalabs_drv.c index 28549d34d99ce..b85ca1e66eb21 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);