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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.LNX.2.00.1611221143550.29400@cbobk.fhfr.pm>
Date:   Tue, 22 Nov 2016 11:44:34 +0100 (CET)
From:   Jiri Kosina <jikos@...nel.org>
To:     Benjamin Tissoires <benjamin.tissoires@...hat.com>
cc:     kbuild test robot <lkp@...el.com>, kbuild-all@...org,
        linux-input@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] HID: lg: fix noderef.cocci warnings

On Mon, 21 Nov 2016, Benjamin Tissoires wrote:

> > Generated by: scripts/coccinelle/misc/noderef.cocci
> > 
> > CC: Benjamin Tissoires <benjamin.tissoires@...hat.com>
> > Signed-off-by: Fengguang Wu <fengguang.wu@...el.com>
> > ---
> > 
> >  hid-lg.c |    6 ++++--
> >  1 file changed, 4 insertions(+), 2 deletions(-)
> > 
> > --- a/drivers/hid/hid-lg.c
> > +++ b/drivers/hid/hid-lg.c
> > @@ -777,8 +777,10 @@ static int lg_probe(struct hid_device *h
> >  			buf[1] = 0xB2;
> >  			get_random_bytes(&buf[2], 2);
> >  
> > -			ret = hid_hw_raw_request(hdev, buf[0], buf, sizeof(buf),
> > -					HID_FEATURE_REPORT, HID_REQ_SET_REPORT);
> > +			ret = hid_hw_raw_request(hdev, buf[0], buf,
> > +						 sizeof(*buf),
> 
> This is wrong. I messed up and should have used "sizeof(cbuf)", but the
> coccinelle script failed at detecting the correct solution (I guess it
> couldn't).

Fengguang, is there anything that could be done to improve this?

> Jiri, do you want me to send a v2 of the series or will you just amend 
> the patch while applying?

I'll fix that up, no worries. Thanks,

-- 
Jiri Kosina
SUSE Labs

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ