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:   Tue, 22 May 2018 19:59:39 +0300
From:   Sergei Shtylyov <sergei.shtylyov@...entembedded.com>
To:     Christoph Hellwig <hch@....de>, viro@...iv.linux.org.uk
Cc:     Avi Kivity <avi@...lladb.com>, linux-aio@...ck.org,
        linux-fsdevel@...r.kernel.org, netdev@...r.kernel.org,
        linux-api@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 30/31] timerfd: convert to ->poll_mask

Hello!

On 05/22/2018 02:31 PM, Christoph Hellwig wrote:

> Signed-off-by: Christoph Hellwig <hch@....de>
> ---
>  fs/timerfd.c | 22 +++++++++++-----------
>  1 file changed, 11 insertions(+), 11 deletions(-)
> 
> diff --git a/fs/timerfd.c b/fs/timerfd.c
> index cdad49da3ff7..d84a2bee4f82 100644
> --- a/fs/timerfd.c
> +++ b/fs/timerfd.c
> @@ -226,21 +226,20 @@ static int timerfd_release(struct inode *inode, struct file *file)
>  	kfree_rcu(ctx, rcu);
>  	return 0;
>  }
> -
> -static __poll_t timerfd_poll(struct file *file, poll_table *wait)
> +	

   Stray tab detected! :-)

> +static struct wait_queue_head *timerfd_get_poll_head(struct file *file,
> +		__poll_t eventmask)
>  {
>  	struct timerfd_ctx *ctx = file->private_data;
> -	__poll_t events = 0;
> -	unsigned long flags;
>  
> -	poll_wait(file, &ctx->wqh, wait);
> +	return &ctx->wqh;
> +}
>  
> -	spin_lock_irqsave(&ctx->wqh.lock, flags);
> -	if (ctx->ticks)
> -		events |= EPOLLIN;
> -	spin_unlock_irqrestore(&ctx->wqh.lock, flags);
> +static __poll_t timerfd_poll_mask(struct file *file, __poll_t eventmask)
> +{
> +	struct timerfd_ctx *ctx = file->private_data;
>  
> -	return events;
> +	return ctx->ticks ? EPOLLIN : 0;
>  }
>  
>  static ssize_t timerfd_read(struct file *file, char __user *buf, size_t count,
[...]

MBR, Sergei

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ