[058/190] Revert "media: cx231xx: replace BUG_ON with recovery code"
diff mbox series

Message ID 20210421130105.1226686-59-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 93a24578de721006055b422c7772e0e417e1983c.

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: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Cc: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 drivers/media/usb/cx231xx/cx231xx-i2c.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

Comments

Pavel Machek April 29, 2021, 8:19 p.m. UTC | #1
Hi!

i2c.c
> index c6659253c6fb..f33b6a077d57 100644
> --- a/drivers/media/usb/cx231xx/cx231xx-i2c.c
> +++ b/drivers/media/usb/cx231xx/cx231xx-i2c.c
> @@ -515,8 +515,7 @@ int cx231xx_i2c_register(struct cx231xx_i2c *bus)
>  {
>  	struct cx231xx *dev = bus->dev;
>  
> -	if (!dev->cx231xx_send_usb_command)
> -		return -EINVAL;
> +	BUG_ON(!dev->cx231xx_send_usb_command);
>  
>  	bus->i2c_adap = cx231xx_adap_template;
>  	bus->i2c_adap.dev.parent = dev->dev;

No big deal either way, and this will only be hit during
development. Linus does not like BUGs, so I'd keep this.

Best regards,
							Pavel

Patch
diff mbox series

diff --git a/drivers/media/usb/cx231xx/cx231xx-i2c.c b/drivers/media/usb/cx231xx/cx231xx-i2c.c
index c6659253c6fb..f33b6a077d57 100644
--- a/drivers/media/usb/cx231xx/cx231xx-i2c.c
+++ b/drivers/media/usb/cx231xx/cx231xx-i2c.c
@@ -515,8 +515,7 @@  int cx231xx_i2c_register(struct cx231xx_i2c *bus)
 {
 	struct cx231xx *dev = bus->dev;
 
-	if (!dev->cx231xx_send_usb_command)
-		return -EINVAL;
+	BUG_ON(!dev->cx231xx_send_usb_command);
 
 	bus->i2c_adap = cx231xx_adap_template;
 	bus->i2c_adap.dev.parent = dev->dev;