Re: uinput crash and NO FIX YET

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux