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: <alpine.DEB.2.00.1101151104260.6884@davide-lnx1>
Date:	Sat, 15 Jan 2011 11:06:04 -0800 (PST)
From:	Davide Libenzi <davidel@...ilserver.org>
To:	Shawn Bohrer <shawn.bohrer@...il.com>
cc:	Andrew Morton <akpm@...ux-foundation.org>,
	Jack Stone <jwjstone@...tmail.fm>,
	Viresh Kumar <viresh.kumar@...com>,
	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
	linux-fsdevel@...r.kernel.org, viro@...iv.linux.org.uk
Subject: Re: [PATCH 1/3] epoll: initialize slack for negative timeout
 values

On Sat, 15 Jan 2011, Shawn Bohrer wrote:

> When a negative timeout value is passed to epoll the 'slack' variable is
> currently unitialized:
> 
> fs/eventpoll.c: In function ‘ep_poll’:
> fs/eventpoll.c:1119: warning: ‘slack’ may be used uninitialized in this function
> 
> In this case a NULL pointer is passed to schedule_hrtimeout_range()
> specifying an infinite timeout.  The current implementation of
> schedule_hrtimeout_range() does not use slack in this case, but we
> should still initialize slack to 0 in case future implementations use it.
> 
> Signed-off-by: Shawn Bohrer <shawn.bohrer@...il.com>
> Acked-by: Davide Libenzi <davidel@...ilserver.org>
> ---
>  fs/eventpoll.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/fs/eventpoll.c b/fs/eventpoll.c
> index 8cf0724..c24a032 100644
> --- a/fs/eventpoll.c
> +++ b/fs/eventpoll.c
> @@ -1116,7 +1116,7 @@ static int ep_poll(struct eventpoll *ep, struct epoll_event __user *events,
>  {
>  	int res, eavail, timed_out = 0;
>  	unsigned long flags;
> -	long slack;
> +	long slack = 0;
>  	wait_queue_t wait;
>  	struct timespec end_time;
>  	ktime_t expires, *to = NULL;

Re-ACK.
But, I am consolidating 1 and (a rewritten) 2, into a single one, since 
they would otherwise conflict with another patch.



- Davide

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ