diff options
Diffstat (limited to 'drivers/gpu/drm/drm_fops.c')
-rw-r--r-- | drivers/gpu/drm/drm_fops.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/gpu/drm/drm_fops.c b/drivers/gpu/drm/drm_fops.c index 5062eec673f1..433d2fad1fe6 100644 --- a/drivers/gpu/drm/drm_fops.c +++ b/drivers/gpu/drm/drm_fops.c | |||
@@ -251,7 +251,7 @@ static int drm_open_helper(struct inode *inode, struct file *filp, | |||
251 | filp->private_data = priv; | 251 | filp->private_data = priv; |
252 | priv->filp = filp; | 252 | priv->filp = filp; |
253 | priv->uid = current_euid(); | 253 | priv->uid = current_euid(); |
254 | priv->pid = task_pid_nr(current); | 254 | priv->pid = get_pid(task_pid(current)); |
255 | priv->minor = idr_find(&drm_minors_idr, minor_id); | 255 | priv->minor = idr_find(&drm_minors_idr, minor_id); |
256 | priv->ioctl_count = 0; | 256 | priv->ioctl_count = 0; |
257 | /* for compatibility root is always authenticated */ | 257 | /* for compatibility root is always authenticated */ |
@@ -524,6 +524,7 @@ int drm_release(struct inode *inode, struct file *filp) | |||
524 | if (drm_core_check_feature(dev, DRIVER_PRIME)) | 524 | if (drm_core_check_feature(dev, DRIVER_PRIME)) |
525 | drm_prime_destroy_file_private(&file_priv->prime); | 525 | drm_prime_destroy_file_private(&file_priv->prime); |
526 | 526 | ||
527 | put_pid(file_priv->pid); | ||
527 | kfree(file_priv); | 528 | kfree(file_priv); |
528 | 529 | ||
529 | /* ======================================================== | 530 | /* ======================================================== |