Messages in this thread Patch in this message | | | Date | Sun, 16 Oct 2005 23:12:52 +0200 | Subject | Re: uinput crash and NO FIX YET | From | emard@softhome ... |
| |
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/
| |