lkml.org 
[lkml]   [2004]   [Jun]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Date
Subject[PATCH 36/39] input: Fix an oops at opentime of /dev/input/event devices
You can pull this changeset from:
bk://kernel.bkbits.net/vojtech/input-for-linus

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

ChangeSet@1.1371.539.2, 2004-05-14 10:23:53+02:00, async@cc.gatech.edu
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@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 14:03    [W:0.057 / U:0.356 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site