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]
Date:	Sat, 1 Nov 2008 06:53:38 +0100
From:	Lennert Buytenhek <buytenh@...tstofly.org>
To:	Roland Dreier <rdreier@...co.com>
Cc:	jeff@...zik.org, netdev@...r.kernel.org
Subject: Re: [PATCH] mv643xx_eth: fix SMI bus access timeouts

On Fri, Oct 31, 2008 at 10:47:47PM -0700, Roland Dreier wrote:

> > If wait_event_timeout() would return zero, mv643xx_eth would conclude
> > that the SMI access timed out, but this is not necessarily true --
> > wait_event_timeout() can also return zero in the case where the SMI
> > completion interrupt did happen in time but where it took longer than
> > the requested timeout for the process performing the SMI access to be
> > scheduled again.  This would lead to occasional SMI access timeouts
> > when the system would be under heavy load.
> 
> Would it make more sense to fix this in the wait_event_timeout() code
> itself a la bb10ed09 ("sched: fix wait_for_completion_timeout() spurious
> failure under heavy load")?

Well, wait_event_timeout() does (or did, before that commit) exactly
what its docbook comment says it does:

	 * The function returns 0 if the @timeout elapsed, and the remaining
	 * jiffies if the condition evaluated to true before the timeout elapsed.

Making it return 1 jiffy seems a bit hacky.  Why not go all the way
and just make it return 0 or 1 in all cases and audit all the callers
(and update the docbook)?
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ