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>] [day] [month] [year] [list]
Date:	Thu, 15 Jul 2010 19:31:27 +0200
From:	Julien Moutinho <julm+linux@...ines.alpes.fr.eu.org>
To:	unlisted-recipients:; (no To-header on input)
Cc:	Julien Moutinho <julm+linux@...ines.alpes.fr.eu.org>,
	Dmitry Torokhov <dmitry.torokhov@...il.com>,
	Thadeu Lima de Souza Cascardo <cascardo@...oscopio.com>,
	Alexey Dobriyan <adobriyan@...il.com>,
	Arnd Bergmann <arnd@...db.de>, linux-input@...r.kernel.org,
	linux-kernel@...r.kernel.org
Subject: [PATCH] Input: mousedev - Fix mousedev_poll() to advertise when /dev/input/mice is writable.

The Microsoft ImPS/2 mouse protocol being bidirectionnal (sic)
one may have to write in /dev/input/mice; and that works better
if select() does not hang.

Signed-off-by: Julien Moutinho <julm+linux@...ines.alpes.fr.eu.org>
---
 drivers/input/mousedev.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/drivers/input/mousedev.c b/drivers/input/mousedev.c
index f34b22b..1f67b8f 100644
--- a/drivers/input/mousedev.c
+++ b/drivers/input/mousedev.c
@@ -768,7 +768,8 @@ static unsigned int mousedev_poll(struct file *file, poll_table *wait)
 
 	poll_wait(file, &mousedev->wait, wait);
 	return ((client->ready || client->buffer) ? (POLLIN | POLLRDNORM) : 0) |
-		(mousedev->exist ? 0 : (POLLHUP | POLLERR));
+		(mousedev->exist ?
+			(POLLOUT | POLLWRNORM) : (POLLHUP | POLLERR));
 }
 
 static const struct file_operations mousedev_fops = {
-- 
1.7.1

--
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