Skip to content

Commit 27ac5aa

Browse files
Tomer Tayargregkh
authored andcommitted
habanalabs: Call put_pid() when releasing control device
The refcount of the "hl_fpriv" structure is not used for the control device, and thus hl_hpriv_put() is not called when releasing this device. This results with no call to put_pid(), so add it explicitly in hl_device_release_ctrl(). Signed-off-by: Tomer Tayar <ttayar@habana.ai> Reviewed-by: Oded Gabbay <ogabbay@kernel.org> Signed-off-by: Oded Gabbay <ogabbay@kernel.org>
1 parent bd0c48e commit 27ac5aa

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

drivers/misc/habanalabs/common/device.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,8 @@ static int hl_device_release_ctrl(struct inode *inode, struct file *filp)
117117
list_del(&hpriv->dev_node);
118118
mutex_unlock(&hdev->fpriv_list_lock);
119119

120+
put_pid(hpriv->taskpid);
121+
120122
kfree(hpriv);
121123

122124
return 0;

0 commit comments

Comments
 (0)