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] [thread-next>] [day] [month] [year] [list]
Message-ID: <20061011141651.GD27388@parisc-linux.org>
Date:	Wed, 11 Oct 2006 08:16:51 -0600
From:	Matthew Wilcox <matthew@....cx>
To:	Arjan van de Ven <arjan@...radead.org>
Cc:	Amol Lad <amol@...ismonetworks.com>,
	kernel Janitors <kernel-janitors@...ts.osdl.org>,
	linux kernel <linux-kernel@...r.kernel.org>
Subject: most users of msleep_interruptible are broken

On Wed, Oct 11, 2006 at 02:58:11PM +0200, Arjan van de Ven wrote:
> > +++ linux-2.6.19-rc1/drivers/mmc/mmc.c	2006-10-11 17:57:02.000000000 +0530
> > @@ -454,7 +454,7 @@ static void mmc_deselect_cards(struct mm
> >  static inline void mmc_delay(unsigned int ms)
> >  {
> >  	if (ms < HZ / 1000) {
> > -		yield();
> > +		cond_resched();
> >  		mdelay(ms);
> 
> 
> this probably wants msleep(), especially with hrtimers comming up; there
> the sleeps are always exact...

They clearly don't care about exactness; they msleep_interruptible and
throw away the return value, so they don't know how long they slept
before they got a signal.

__must_check treatment for msleep_interruptible, anyone?  On the one hand,
that's 136 new warnings.  On the other hand, that's 136 places wheree
we may as well *delete the call* to msleep_interruptible.  Since it can
return immediately, the code must be prepared to deal with that ... right?
-
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