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, 15 Aug 2009 18:15:59 -0700
From:	Andrew Morton <akpm@...ux-foundation.org>
To:	Tejun Heo <tj@...nel.org>
Cc:	Guillaume Knispel <gknispel@...formatique.com>,
	linux-kernel@...r.kernel.org, Miklos Szeredi <mszeredi@...e.cz>,
	Linus Torvalds <torvalds@...ux-foundation.org>,
	Alexander Viro <viro@...iv.linux.org.uk>,
	Arjan van de Ven <arjan@...ux.intel.com>,
	Heiko Carstens <heiko.carstens@...ibm.com>,
	Thomas Gleixner <tglx@...utronix.de>,
	linux-fsdevel@...r.kernel.org, stable@...nel.org
Subject: Re: [PATCH] poll/select: initialize triggered field of struct
 poll_wqueues

On Sun, 16 Aug 2009 09:53:08 +0900 Tejun Heo <tj@...nel.org> wrote:

> Guillaume Knispel wrote:
> > poll/select: initialize triggered field of struct poll_wqueues
> > 
> > The triggered field of struct poll_wqueues introduced in commit
> > 5f820f648c92a5ecc771a96b3c29aa6e90013bba "poll: allow f_op->poll to
> > sleep" was set to 1 in pollwake() (now __pollwake() ), tested and
> > later set to 0 in poll_schedule_timeout(), but not initialized before.
> > As a result when the process needs to sleep, triggered was likely to be
> > non-zero even if pollwake() is not called before the first
> > poll_schedule_timeout(), meaning schedule_hrtimeout_range() would not
> > be called and an extra loop calling all ->poll() would be done.
> > 
> > This patch initialize triggered to 0 in poll_initwait() so the ->poll()
> > are not called twice before the process goes to sleep when it needs to.
> > 
> > Signed-off-by: Guillaume Knispel <gknispel@...formatique.com>
> 
> Ah... nice spotting.
> 
> Acked-by: Tejun Heo <tj@...nel.org>
> 

OK, thanks.

I tagged this for -stable backporting.  That isn't strictly needed, as
there's no particular harm caused here.  But using an uninitialised
variable in the core poll/select code is pretty gross.

--
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