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 Feb 2020 20:51:37 +0000
From:   Dragan Cvetic <draganc@...inx.com>
To:     Sasha Levin <sashal@...nel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "stable@...r.kernel.org" <stable@...r.kernel.org>
CC:     Luc Van Oostenryck <luc.vanoostenryck@...il.com>,
        Derek Kiernan <dkiernan@...inx.com>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        "linux-arm-kernel@...ts.infradead.org" 
        <linux-arm-kernel@...ts.infradead.org>
Subject: RE: [PATCH AUTOSEL 5.5 344/542] misc: xilinx_sdfec: fix
 xsdfec_poll()'s return type



> -----Original Message-----
> From: Sasha Levin <sashal@...nel.org>
> Sent: Friday 14 February 2020 15:46
> To: linux-kernel@...r.kernel.org; stable@...r.kernel.org
> Cc: Luc Van Oostenryck <luc.vanoostenryck@...il.com>; Derek Kiernan <dkiernan@...inx.com>; Dragan Cvetic
> <draganc@...inx.com>; Greg Kroah-Hartman <gregkh@...uxfoundation.org>; Sasha Levin <sashal@...nel.org>; linux-arm-
> kernel@...ts.infradead.org
> Subject: [PATCH AUTOSEL 5.5 344/542] misc: xilinx_sdfec: fix xsdfec_poll()'s return type
> 
> From: Luc Van Oostenryck <luc.vanoostenryck@...il.com>
> 
> [ Upstream commit fa4e7fc1386078edcfddd8848cb0374f4af74fe7 ]
> 
> xsdfec_poll() is defined as returning 'unsigned int' but the
> .poll method is declared as returning '__poll_t', a bitwise type.
> 
> Fix this by using the proper return type and using the EPOLL
> constants instead of the POLL ones, as required for __poll_t.
> 
> CC: Derek Kiernan <derek.kiernan@...inx.com>
> CC: Dragan Cvetic <dragan.cvetic@...inx.com>
> Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@...il.com>
> Acked-by: Dragan Cvetic <dragan.cvetic@...inx.com>
> Link: https://lore.kernel.org/r/20191209213655.57985-1-luc.vanoostenryck@gmail.com
> Signed-off-by: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
> Signed-off-by: Sasha Levin <sashal@...nel.org>
> ---
>  drivers/misc/xilinx_sdfec.c | 10 +++++-----
>  1 file changed, 5 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/misc/xilinx_sdfec.c b/drivers/misc/xilinx_sdfec.c
> index 11835969e9828..48ba7e02bed72 100644
> --- a/drivers/misc/xilinx_sdfec.c
> +++ b/drivers/misc/xilinx_sdfec.c
> @@ -1025,25 +1025,25 @@ static long xsdfec_dev_compat_ioctl(struct file *file, unsigned int cmd,
>  }
>  #endif
> 
> -static unsigned int xsdfec_poll(struct file *file, poll_table *wait)
> +static __poll_t xsdfec_poll(struct file *file, poll_table *wait)
>  {
> -	unsigned int mask = 0;
> +	__poll_t mask = 0;
>  	struct xsdfec_dev *xsdfec;
> 
>  	xsdfec = container_of(file->private_data, struct xsdfec_dev, miscdev);
> 
>  	if (!xsdfec)
> -		return POLLNVAL | POLLHUP;
> +		return EPOLLNVAL | EPOLLHUP;
> 
>  	poll_wait(file, &xsdfec->waitq, wait);
> 
>  	/* XSDFEC ISR detected an error */
>  	spin_lock_irqsave(&xsdfec->error_data_lock, xsdfec->flags);
>  	if (xsdfec->state_updated)
> -		mask |= POLLIN | POLLPRI;
> +		mask |= EPOLLIN | EPOLLPRI;
> 
>  	if (xsdfec->stats_updated)
> -		mask |= POLLIN | POLLRDNORM;
> +		mask |= EPOLLIN | EPOLLRDNORM;
>  	spin_unlock_irqrestore(&xsdfec->error_data_lock, xsdfec->flags);
> 
>  	return mask;
> --
> 2.20.1

Acked-by: Dragan Cvetic <dragan.cvetic@...inx.com>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ