lkml.org 
[lkml]   [2005]   [Oct]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
SubjectRe: uinput crash and NO FIX YET
From
Seems the crash is coming from bad locking

I have located exact place where the problem is manifested and
did this patch:

--- drivers/input/misc/uinput.c.orig 2005-10-15 10:09:38.000000000 +0200
+++ drivers/input/misc/uinput.c 2005-10-16 22:19:20.000000000 +0200
@@ -93,7 +93,8 @@ static void uinput_request_done(struct u
complete(&request->done);

/* Mark slot as available */
- udev->requests[request->id] = NULL;
+ if(request->id >= 0 && request->id < UINPUT_NUM_REQUESTS)
+ udev->requests[request->id] = NULL;
wake_up_interruptible(&udev->requests_waitq);
}

This checks wether request id has some sane value.
This way I have avoided crashes but now I'm running
of request[ ] slots, sometimes they tend to leak and
when all the slots are exhausted no more effects can
be accepted.
-
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-10-16 23:15    [W:3.196 / U:0.252 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site