[PATCH 3/47] Fix an oops in poll() on uinput.

From: Vojtech Pavlik
Date: Thu Jul 29 2004 - 13:22:40 EST


You can pull this changeset from:
bk://kernel.bkbits.net/vojtech/input

===================================================================

ChangeSet@xxxxxxxxxxx, 2004-05-28 22:57:43+02:00, vojtech@xxxxxxx
input: Fix an oops in poll() on uinput. Thanks to Dmitry Torokhov
for suggesting the fix.


uinput.c | 3 +++
1 files changed, 3 insertions(+)

===================================================================

diff -Nru a/drivers/input/misc/uinput.c b/drivers/input/misc/uinput.c
--- a/drivers/input/misc/uinput.c Thu Jul 29 14:42:19 2004
+++ b/drivers/input/misc/uinput.c Thu Jul 29 14:42:19 2004
@@ -279,6 +279,9 @@
{
struct uinput_device *udev = file->private_data;

+ if (!test_bit(UIST_CREATED, &(udev->state)))
+ return -ENODEV;
+
poll_wait(file, &udev->waitq, wait);

if (udev->head != udev->tail)

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/