linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Input: uinput - Fix returning EPOLLOUT from uinput_poll
@ 2019-12-04  2:50 Marcel Holtmann
  2019-12-05  1:27 ` Dmitry Torokhov
  0 siblings, 1 reply; 2+ messages in thread
From: Marcel Holtmann @ 2019-12-04  2:50 UTC (permalink / raw)
  To: Dmitry Torokhov, Greg Kroah-Hartman; +Cc: linux-input, linux-kernel

Always return EPOLLOUT from uinput_poll to allow polling /dev/uinput
for writable state.

Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Cc: stable@vger.kernel.org
---
 drivers/input/misc/uinput.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/input/misc/uinput.c b/drivers/input/misc/uinput.c
index 84051f20b18a..fd253781be71 100644
--- a/drivers/input/misc/uinput.c
+++ b/drivers/input/misc/uinput.c
@@ -695,7 +695,7 @@ static __poll_t uinput_poll(struct file *file, poll_table *wait)
 	if (udev->head != udev->tail)
 		return EPOLLIN | EPOLLRDNORM;
 
-	return 0;
+	return EPOLLOUT | EPOLLWRNORM;
 }
 
 static int uinput_release(struct inode *inode, struct file *file)
-- 
2.23.0


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] Input: uinput - Fix returning EPOLLOUT from uinput_poll
  2019-12-04  2:50 [PATCH] Input: uinput - Fix returning EPOLLOUT from uinput_poll Marcel Holtmann
@ 2019-12-05  1:27 ` Dmitry Torokhov
  0 siblings, 0 replies; 2+ messages in thread
From: Dmitry Torokhov @ 2019-12-05  1:27 UTC (permalink / raw)
  To: Marcel Holtmann; +Cc: Greg Kroah-Hartman, linux-input, linux-kernel

On Wed, Dec 04, 2019 at 03:50:14AM +0100, Marcel Holtmann wrote:
> Always return EPOLLOUT from uinput_poll to allow polling /dev/uinput
> for writable state.
> 
> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
> Cc: stable@vger.kernel.org

Applied, thank you.

> ---
>  drivers/input/misc/uinput.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/input/misc/uinput.c b/drivers/input/misc/uinput.c
> index 84051f20b18a..fd253781be71 100644
> --- a/drivers/input/misc/uinput.c
> +++ b/drivers/input/misc/uinput.c
> @@ -695,7 +695,7 @@ static __poll_t uinput_poll(struct file *file, poll_table *wait)
>  	if (udev->head != udev->tail)
>  		return EPOLLIN | EPOLLRDNORM;
>  
> -	return 0;
> +	return EPOLLOUT | EPOLLWRNORM;
>  }
>  
>  static int uinput_release(struct inode *inode, struct file *file)
> -- 
> 2.23.0
> 

-- 
Dmitry

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-12-05  1:27 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-12-04  2:50 [PATCH] Input: uinput - Fix returning EPOLLOUT from uinput_poll Marcel Holtmann
2019-12-05  1:27 ` Dmitry Torokhov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).