Skip to contentSkip to conversation

Input: uinput - Fix returning EPOLLOUT from uinput_poll

PATCH Applied Marcel Holtmann 2 participants 2 messages Dec 4, 2019 – Dec 5, 2019

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Input: uinput - Fix returning EPOLLOUT from uinput_poll

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

---
 drivers/input/misc/uinput.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/input/misc/uinput.c +1 -1
index 84051f20b18a..fd253781be71 100644
@@ -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)
Signature · 1 line
2.23.0
maintainer Applied
#1 lore raw
Quoted 5 lines · Marcel Holtmann

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

Applied, thank you.

Quoted 20 lines
---
 drivers/input/misc/uinput.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/input/misc/uinput.c +1 -1
index 84051f20b18a..fd253781be71 100644
@@ -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)
Signature · 1 line
2.23.0
Signature · 1 line
Dmitry