[023/190] Revert "drm/radeon: fix multiple reference count leak"
diff mbox series

Message ID 20210421130105.1226686-24-gregkh@linuxfoundation.org
State New, archived
Headers show
Series
  • Revertion of all of the umn.edu commits
Related show

Commit Message

Greg KH April 21, 2021, 12:58 p.m. UTC
This reverts commit 6f2e8acdb48ed166b65d47837c31b177460491ec.

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: Aditya Pakki <pakki001@umn.edu>
Cc: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 drivers/gpu/drm/radeon/radeon_connectors.c | 20 +++++---------------
 1 file changed, 5 insertions(+), 15 deletions(-)

Comments

Deucher, Alexander April 21, 2021, 4:07 p.m. UTC | #1
[AMD Public Use]

> -----Original Message-----
> From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> Sent: Wednesday, April 21, 2021 8:58 AM
> To: linux-kernel@vger.kernel.org
> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>; Aditya Pakki
> <pakki001@umn.edu>; Deucher, Alexander
> <Alexander.Deucher@amd.com>
> Subject: [PATCH 023/190] Revert "drm/radeon: fix multiple reference count
> leak"
> 
> This reverts commit 6f2e8acdb48ed166b65d47837c31b177460491ec.
> 
> 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: Aditya Pakki <pakki001@umn.edu>
> Cc: Alex Deucher <alexander.deucher@amd.com>
> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.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_connectors.c | 20 +++++---------------
>  1 file changed, 5 insertions(+), 15 deletions(-)
> 
> diff --git a/drivers/gpu/drm/radeon/radeon_connectors.c
> b/drivers/gpu/drm/radeon/radeon_connectors.c
> index 607ad5620bd9..ba8885676676 100644
> --- a/drivers/gpu/drm/radeon/radeon_connectors.c
> +++ b/drivers/gpu/drm/radeon/radeon_connectors.c
> @@ -879,10 +879,8 @@ radeon_lvds_detect(struct drm_connector
> *connector, bool force)
> 
>  	if (!drm_kms_helper_is_poll_worker()) {
>  		r = pm_runtime_get_sync(connector->dev->dev);
> -		if (r < 0) {
> -			pm_runtime_put_autosuspend(connector->dev-
> >dev);
> +		if (r < 0)
>  			return connector_status_disconnected;
> -		}
>  	}
> 
>  	if (encoder) {
> @@ -1027,10 +1025,8 @@ radeon_vga_detect(struct drm_connector
> *connector, bool force)
> 
>  	if (!drm_kms_helper_is_poll_worker()) {
>  		r = pm_runtime_get_sync(connector->dev->dev);
> -		if (r < 0) {
> -			pm_runtime_put_autosuspend(connector->dev-
> >dev);
> +		if (r < 0)
>  			return connector_status_disconnected;
> -		}
>  	}
> 
>  	encoder = radeon_best_single_encoder(connector);
> @@ -1167,10 +1163,8 @@ radeon_tv_detect(struct drm_connector
> *connector, bool force)
> 
>  	if (!drm_kms_helper_is_poll_worker()) {
>  		r = pm_runtime_get_sync(connector->dev->dev);
> -		if (r < 0) {
> -			pm_runtime_put_autosuspend(connector->dev-
> >dev);
> +		if (r < 0)
>  			return connector_status_disconnected;
> -		}
>  	}
> 
>  	encoder = radeon_best_single_encoder(connector);
> @@ -1253,10 +1247,8 @@ radeon_dvi_detect(struct drm_connector
> *connector, bool force)
> 
>  	if (!drm_kms_helper_is_poll_worker()) {
>  		r = pm_runtime_get_sync(connector->dev->dev);
> -		if (r < 0) {
> -			pm_runtime_put_autosuspend(connector->dev-
> >dev);
> +		if (r < 0)
>  			return connector_status_disconnected;
> -		}
>  	}
> 
>  	if (radeon_connector->detected_hpd_without_ddc) { @@ -1665,10
> +1657,8 @@ radeon_dp_detect(struct drm_connector *connector, bool
> force)
> 
>  	if (!drm_kms_helper_is_poll_worker()) {
>  		r = pm_runtime_get_sync(connector->dev->dev);
> -		if (r < 0) {
> -			pm_runtime_put_autosuspend(connector->dev-
> >dev);
> +		if (r < 0)
>  			return connector_status_disconnected;
> -		}
>  	}
> 
>  	if (!force && radeon_check_hpd_status_unchanged(connector)) {
> --
> 2.31.1
Greg KH April 27, 2021, 1:41 p.m. UTC | #2
On Wed, Apr 21, 2021 at 04:07:14PM +0000, Deucher, Alexander wrote:
> [AMD Public Use]
> 
> > -----Original Message-----
> > From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> > Sent: Wednesday, April 21, 2021 8:58 AM
> > To: linux-kernel@vger.kernel.org
> > Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>; Aditya Pakki
> > <pakki001@umn.edu>; Deucher, Alexander
> > <Alexander.Deucher@amd.com>
> > Subject: [PATCH 023/190] Revert "drm/radeon: fix multiple reference count
> > leak"
> > 
> > This reverts commit 6f2e8acdb48ed166b65d47837c31b177460491ec.
> > 
> > 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: Aditya Pakki <pakki001@umn.edu>
> > Cc: Alex Deucher <alexander.deucher@amd.com>
> > Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.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.

Thanks for the review, now dropped.

greg k-h

Patch
diff mbox series

diff --git a/drivers/gpu/drm/radeon/radeon_connectors.c b/drivers/gpu/drm/radeon/radeon_connectors.c
index 607ad5620bd9..ba8885676676 100644
--- a/drivers/gpu/drm/radeon/radeon_connectors.c
+++ b/drivers/gpu/drm/radeon/radeon_connectors.c
@@ -879,10 +879,8 @@  radeon_lvds_detect(struct drm_connector *connector, bool force)
 
 	if (!drm_kms_helper_is_poll_worker()) {
 		r = pm_runtime_get_sync(connector->dev->dev);
-		if (r < 0) {
-			pm_runtime_put_autosuspend(connector->dev->dev);
+		if (r < 0)
 			return connector_status_disconnected;
-		}
 	}
 
 	if (encoder) {
@@ -1027,10 +1025,8 @@  radeon_vga_detect(struct drm_connector *connector, bool force)
 
 	if (!drm_kms_helper_is_poll_worker()) {
 		r = pm_runtime_get_sync(connector->dev->dev);
-		if (r < 0) {
-			pm_runtime_put_autosuspend(connector->dev->dev);
+		if (r < 0)
 			return connector_status_disconnected;
-		}
 	}
 
 	encoder = radeon_best_single_encoder(connector);
@@ -1167,10 +1163,8 @@  radeon_tv_detect(struct drm_connector *connector, bool force)
 
 	if (!drm_kms_helper_is_poll_worker()) {
 		r = pm_runtime_get_sync(connector->dev->dev);
-		if (r < 0) {
-			pm_runtime_put_autosuspend(connector->dev->dev);
+		if (r < 0)
 			return connector_status_disconnected;
-		}
 	}
 
 	encoder = radeon_best_single_encoder(connector);
@@ -1253,10 +1247,8 @@  radeon_dvi_detect(struct drm_connector *connector, bool force)
 
 	if (!drm_kms_helper_is_poll_worker()) {
 		r = pm_runtime_get_sync(connector->dev->dev);
-		if (r < 0) {
-			pm_runtime_put_autosuspend(connector->dev->dev);
+		if (r < 0)
 			return connector_status_disconnected;
-		}
 	}
 
 	if (radeon_connector->detected_hpd_without_ddc) {
@@ -1665,10 +1657,8 @@  radeon_dp_detect(struct drm_connector *connector, bool force)
 
 	if (!drm_kms_helper_is_poll_worker()) {
 		r = pm_runtime_get_sync(connector->dev->dev);
-		if (r < 0) {
-			pm_runtime_put_autosuspend(connector->dev->dev);
+		if (r < 0)
 			return connector_status_disconnected;
-		}
 	}
 
 	if (!force && radeon_check_hpd_status_unchanged(connector)) {