lkml.org 
[lkml]   [2021]   [Apr]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH 153/190] Revert "media: usb: gspca: add a missed return-value check for do_command"
    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

    \
     
     \ /
      Last update: 2021-04-27 15:25    [W:2.114 / U:2.880 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site