[PATCH 36/39] input: Fix an oops at opentime of /dev/input/event devices
From: Vojtech Pavlik
Date: Mon Jun 07 2004 - 08:18:27 EST
You can pull this changeset from:
bk://kernel.bkbits.net/vojtech/input-for-linus
===================================================================
ChangeSet@xxxxxxxxxxxx, 2004-05-14 10:23:53+02:00, async@xxxxxxxxxxxxx
evdev.c:
input: Fix an oops at opentime of /dev/input/event devices
evdev.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
===================================================================
diff -Nru a/drivers/input/evdev.c b/drivers/input/evdev.c
--- a/drivers/input/evdev.c 2004-06-07 13:10:32 +02:00
+++ b/drivers/input/evdev.c 2004-06-07 13:10:32 +02:00
@@ -126,7 +126,7 @@
int i = iminor(inode) - EVDEV_MINOR_BASE;
int accept_err;
- if (i >= EVDEV_MINORS || !evdev_table[i])
+ if (i >= EVDEV_MINORS || !evdev_table[i] || !evdev_table[i]->exist)
return -ENODEV;
if ((accept_err = input_accept_process(&(evdev_table[i]->handle), file)))
@@ -175,7 +175,7 @@
return -EAGAIN;
retval = wait_event_interruptible(list->evdev->wait,
- list->head != list->tail && list->evdev->exist);
+ list->head != list->tail || (!list->evdev->exist));
if (retval)
return retval;
-
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/