Commit b0b09b7a authored by Dani Liberman's avatar Dani Liberman Committed by Greg Kroah-Hartman

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: default avatarDani Liberman <dliberman@habana.ai>
Reviewed-by: default avatarOded Gabbay <ogabbay@kernel.org>
Signed-off-by: default avatarOded Gabbay <ogabbay@kernel.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 5d1a0de2
......@@ -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);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment