[153/190] Revert "media: usb: gspca: add a missed return-value check for do_command"
diff mbox series

Message ID 20210421130105.1226686-154-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, 1 p.m. UTC
This reverts commit 5ceaf5452c1b2a452dadaf377f9f07af7bda9cc3.

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: Kangjie Lu <kjlu@umn.edu>
Cc: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 drivers/media/usb/gspca/cpia1.c | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

Comments

Greg KH April 27, 2021, 1:24 p.m. UTC | #1
On Wed, Apr 21, 2021 at 03:00:28PM +0200, Greg Kroah-Hartman wrote:
> This reverts commit 5ceaf5452c1b2a452dadaf377f9f07af7bda9cc3.
> 
> 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: Kangjie Lu <kjlu@umn.edu>
> Cc: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> ---
>  drivers/media/usb/gspca/cpia1.c | 8 ++------
>  1 file changed, 2 insertions(+), 6 deletions(-)
> 
> diff --git a/drivers/media/usb/gspca/cpia1.c b/drivers/media/usb/gspca/cpia1.c
> index d93d384286c1..99e594559a0c 100644
> --- a/drivers/media/usb/gspca/cpia1.c
> +++ b/drivers/media/usb/gspca/cpia1.c
> @@ -537,14 +537,10 @@ static int do_command(struct gspca_dev *gspca_dev, u16 command,
>  		}
>  		if (sd->params.qx3.button) {
>  			/* button pressed - unlock the latch */
> -			ret = do_command(gspca_dev, CPIA_COMMAND_WriteMCPort,
> +			do_command(gspca_dev, CPIA_COMMAND_WriteMCPort,
>  				   3, 0xdf, 0xdf, 0);
> -			if (ret)
> -				return ret;
> -			ret = do_command(gspca_dev, CPIA_COMMAND_WriteMCPort,
> +			do_command(gspca_dev, CPIA_COMMAND_WriteMCPort,
>  				   3, 0xff, 0xff, 0);
> -			if (ret)
> -				return ret;
>  		}
>  
>  		/* test whether microscope is cradled */
> -- 
> 2.31.1
> 

This looks correct, I'll drop the revert.

But ick, recursion?  What could go wrong....

greg k-h

Patch
diff mbox series

diff --git a/drivers/media/usb/gspca/cpia1.c b/drivers/media/usb/gspca/cpia1.c
index d93d384286c1..99e594559a0c 100644
--- a/drivers/media/usb/gspca/cpia1.c
+++ b/drivers/media/usb/gspca/cpia1.c
@@ -537,14 +537,10 @@  static int do_command(struct gspca_dev *gspca_dev, u16 command,
 		}
 		if (sd->params.qx3.button) {
 			/* button pressed - unlock the latch */
-			ret = do_command(gspca_dev, CPIA_COMMAND_WriteMCPort,
+			do_command(gspca_dev, CPIA_COMMAND_WriteMCPort,
 				   3, 0xdf, 0xdf, 0);
-			if (ret)
-				return ret;
-			ret = do_command(gspca_dev, CPIA_COMMAND_WriteMCPort,
+			do_command(gspca_dev, CPIA_COMMAND_WriteMCPort,
 				   3, 0xff, 0xff, 0);
-			if (ret)
-				return ret;
 		}
 
 		/* test whether microscope is cradled */