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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Mon, 30 Sep 2013 20:59:06 +0000
From:	Eric Wong <normalperson@...t.net>
To:	Andi Kleen <andi@...stfloor.org>
Cc:	linux-kernel@...r.kernel.org, Andi Kleen <ak@...ux.intel.com>,
	viro@...iv.linux.org.uk
Subject: Re: [PATCH 09/11] epoll: Remove unnecessary error path

Andi Kleen <andi@...stfloor.org> wrote:
> From: Andi Kleen <ak@...ux.intel.com>
> 
> A static checker was pointing out that nothing can possible set
> nwait < 0 in this path. The comment and the check appears to be
> outdated. Remove it.

I don't think so...

> Cc: viro@...iv.linux.org.uk
> Signed-off-by: Andi Kleen <ak@...ux.intel.com>
> ---
>  fs/eventpoll.c | 10 ----------
>  1 file changed, 10 deletions(-)
> 
> diff --git a/fs/eventpoll.c b/fs/eventpoll.c
> index 473e09d..f72bf55 100644
> --- a/fs/eventpoll.c
> +++ b/fs/eventpoll.c
> @@ -1276,15 +1276,6 @@ static int ep_insert(struct eventpoll *ep, struct epoll_event *event,
>  	 */
>  	revents = ep_item_poll(epi, &epq.pt);

ep_item_poll calls f_op->poll, which calls poll_wait().
poll_wait() will call ep_ptable_queue_proc.

> -	/*
> -	 * We have to check if something went wrong during the poll wait queue
> -	 * install process. Namely an allocation for a wait queue failed due
> -	 * high memory pressure.
> -	 */
> -	error = -ENOMEM;
> -	if (epi->nwait < 0)
> -		goto error_unregister;
> -
>  	/* Add the current item to the list of active epoll hook for this file */
>  	spin_lock(&tfile->f_lock);
>  	list_add_tail(&epi->fllink, &tfile->f_ep_links);
> @@ -1334,7 +1325,6 @@ error_remove_epi:
>  
>  	rb_erase(&epi->rbn, &ep->rbr);
>  
> -error_unregister:
>  	ep_unregister_pollwait(ep, epi);
>  
>  	/*
--
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