lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Wed, 21 Apr 2021 16:08:05 +0000
From:   "Deucher, Alexander" <Alexander.Deucher@....com>
To:     Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
CC:     "Quan, Evan" <Evan.Quan@....com>, Aditya Pakki <pakki001@....edu>
Subject: RE: [PATCH 022/190] Revert "drm/radeon: Fix reference count leaks
 caused by pm_runtime_get_sync"

[AMD Public Use]

> -----Original Message-----
> From: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
> Sent: Wednesday, April 21, 2021 8:58 AM
> To: linux-kernel@...r.kernel.org
> Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>; Quan, Evan
> <Evan.Quan@....com>; Aditya Pakki <pakki001@....edu>; Deucher,
> Alexander <Alexander.Deucher@....com>
> Subject: [PATCH 022/190] Revert "drm/radeon: Fix reference count leaks
> caused by pm_runtime_get_sync"
> 
> This reverts commit 9fb10671011143d15b6b40d6d5fa9c52c57e9d63.
> 
> Commits from @umn.edu addresses have been found to be submitted in
> "bad faith" to try to test the kernel community's ability to review "known
> malicious" changes.  The result of these submissions can be found in a paper
> published at the 42nd IEEE Symposium on Security and Privacy entitled,
> "Open Source Insecurity: Stealthily Introducing Vulnerabilities via Hypocrite
> Commits" written by Qiushi Wu (University of Minnesota) and Kangjie Lu
> (University of Minnesota).
> 
> Because of this, all submissions from this group must be reverted from the
> kernel tree and will need to be re-reviewed again to determine if they
> actually are a valid fix.  Until that work is complete, remove this change to
> ensure that no problems are being introduced into the codebase.
> 
> Cc: Evan Quan <evan.quan@....com>
> Cc: Aditya Pakki <pakki001@....edu>
> Cc: Alex Deucher <alexander.deucher@....com>
> Signed-off-by: Greg Kroah-Hartman <gregkh@...uxfoundation.org>

AFAICT, this patch is correct or at least does no harm.  Handling of pm_runtime_get_sync() errors in the kernel seems to be inconsistent at best.

Alex

> ---
>  drivers/gpu/drm/radeon/radeon_display.c | 4 +---
>  drivers/gpu/drm/radeon/radeon_drv.c     | 4 +---
>  drivers/gpu/drm/radeon/radeon_kms.c     | 4 +---
>  3 files changed, 3 insertions(+), 9 deletions(-)
> 
> diff --git a/drivers/gpu/drm/radeon/radeon_display.c
> b/drivers/gpu/drm/radeon/radeon_display.c
> index 652af7a134bd..9f29ba6c2bed 100644
> --- a/drivers/gpu/drm/radeon/radeon_display.c
> +++ b/drivers/gpu/drm/radeon/radeon_display.c
> @@ -627,10 +627,8 @@ radeon_crtc_set_config(struct drm_mode_set *set,
>  	dev = set->crtc->dev;
> 
>  	ret = pm_runtime_get_sync(dev->dev);
> -	if (ret < 0) {
> -		pm_runtime_put_autosuspend(dev->dev);
> +	if (ret < 0)
>  		return ret;
> -	}
> 
>  	ret = drm_crtc_helper_set_config(set, ctx);
> 
> diff --git a/drivers/gpu/drm/radeon/radeon_drv.c
> b/drivers/gpu/drm/radeon/radeon_drv.c
> index efeb115ae70e..468b364c2dab 100644
> --- a/drivers/gpu/drm/radeon/radeon_drv.c
> +++ b/drivers/gpu/drm/radeon/radeon_drv.c
> @@ -513,10 +513,8 @@ long radeon_drm_ioctl(struct file *filp,
>  	long ret;
>  	dev = file_priv->minor->dev;
>  	ret = pm_runtime_get_sync(dev->dev);
> -	if (ret < 0) {
> -		pm_runtime_put_autosuspend(dev->dev);
> +	if (ret < 0)
>  		return ret;
> -	}
> 
>  	ret = drm_ioctl(filp, cmd, arg);
> 
> diff --git a/drivers/gpu/drm/radeon/radeon_kms.c
> b/drivers/gpu/drm/radeon/radeon_kms.c
> index 2479d6ab7a36..df644bb68c0f 100644
> --- a/drivers/gpu/drm/radeon/radeon_kms.c
> +++ b/drivers/gpu/drm/radeon/radeon_kms.c
> @@ -644,10 +644,8 @@ int radeon_driver_open_kms(struct drm_device
> *dev, struct drm_file *file_priv)
>  	file_priv->driver_priv = NULL;
> 
>  	r = pm_runtime_get_sync(dev->dev);
> -	if (r < 0) {
> -		pm_runtime_put_autosuspend(dev->dev);
> +	if (r < 0)
>  		return r;
> -	}
> 
>  	/* new gpu have virtual address space support */
>  	if (rdev->family >= CHIP_CAYMAN) {
> --
> 2.31.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ