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]
Message-ID: <1432094237.2870.262.camel@perches.com>
Date:	Tue, 19 May 2015 20:57:17 -0700
From:	Joe Perches <joe@...ches.com>
To:	Guenter Roeck <linux@...ck-us.net>
Cc:	David Miller <davem@...emloft.net>, hofrat@...dl.org,
	samuel@...tiz.org, netdev@...r.kernel.org,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH] irda: irda-usb: use msecs_to_jiffies for conversions

On Tue, 2015-05-19 at 18:44 -0700, Guenter Roeck wrote:
> On Tue, May 19, 2015 at 02:09:07PM -0700, Joe Perches wrote:
> > The other thing that could be done is to use
> > 	max(1ul, msecs_to_jiffies())
> > so that there's always some delay even if HZ <= 50
> > 
> I may be mistaken, but I am quite sure that msecs_to_jiffies() always returns
> at least 1 in such situations. Otherwise there would be lots of conversions
> to 0 in the kernel.

Thanks Guenter

Nope, you're not mistaken.

Non 0 constants always return a value > 0

The existing uses like max(1ul, msecs_to_jiffies(<variable>))
just guard against <variable> being 0.


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ