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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Wed, 20 Oct 2021 20:46:11 +0000
From:   David Laight <David.Laight@...LAB.COM>
To:     'Greg KH' <gregkh@...uxfoundation.org>,
        Sebastian Luchetti <luchetti.linux@...il.com>
CC:     "linux-staging@...ts.linux.dev" <linux-staging@...ts.linux.dev>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: RE: [PATCH] staging: rts5208: ms.c: Remove two udelay calls and use
 usleep_range instead

From: Greg KH
> Sent: 17 October 2021 14:42
> 
> On Sun, Oct 17, 2021 at 02:27:12PM +0200, Sebastian Luchetti wrote:
> > This patch fixes the issue:
> > CHECK: usleep_range is preferred over udelay; see
> > Documentation/timers/timers-howto.txt
> > in two occurrences.
> >
> > Signed-off-by: Sebastian Luchetti <luchetti.linux@...il.com>
> > ---
> >  drivers/staging/rts5208/ms.c | 4 ++--
> >  1 file changed, 2 insertions(+), 2 deletions(-)
> >
> > diff --git a/drivers/staging/rts5208/ms.c b/drivers/staging/rts5208/ms.c
> > index 2a6fab5c117a..7292c8f013fd 100644
> > --- a/drivers/staging/rts5208/ms.c
> > +++ b/drivers/staging/rts5208/ms.c
> > @@ -3236,7 +3236,7 @@ static int ms_write_multiple_pages(struct rtsx_chip *chip, u16 old_blk,
> >  			return STATUS_FAIL;
> >  		}
> >
> > -		udelay(30);
> > +		usleep_range(27, 32);
> 
> These are very odd choices of a number, where did they come from?
> 
> And as the other thread on this mailing list a few hours ago describes,
> for this same type of change, you need to test this with the actual
> hardware to know if this works properly or not.  Have you done so?

You also need to check that it is actually safe to sleep.
The style of the commit messages doesn't give massive
confidence that you have checked.

	David

-
Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK
Registration No: 1397386 (Wales)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ