Messages in this thread | | | Subject | Re: [PATCH] evdev: Release eventual input device grabs when getting disconnected | From | Johannes Berg <> | Date | Mon, 31 Mar 2008 22:21:10 +0200 |
| |
On Sun, 2008-03-30 at 14:51 -0700, Linus Torvalds wrote:
> On Sun, 30 Mar 2008, Björn Steinbrink wrote: > > > > I can't reproduce the bug on my UP box and currently can't afford > > crashing my SMP box (all the oopses seem to come from SMP kernels, so I > > guess it needs SMP to crash), so while this doesn't show any new > > problems, I can't tell whether it actually fixes anything. Testers > > welcome!
Odd, I can reproduce trivially on UP. The patch definitely helps.
> Ok, I applied this because I will do an -rc8 today or tomorrow, but I > really really hope somebody can figure out what made this all start to > trigger.
Unfortunately, I can't even bisect, I just tried compiling 2.6.25-rc1 and it failed to link because of __udivi3, __umodi3 and another one (or similar). A quick look failed to tell me why I get that with -rc1 and -rc2 but not -rc7.
Below is a simple test program. Run it on any event device, then rmmod the module the device belongs to and abort the program with ctrl-c.
johannes
#include <stdlib.h> #include <unistd.h> #include <stdio.h> #include <sys/types.h> #include <sys/stat.h> #include <fcntl.h> #include <linux/input.h>
int main (int argc, char **argv) { int fd;
if (argc < 2) { printf("Usage: grab /dev/input/eventX\n"); printf("Where X = input device number\n"); exit(1); }
if ((fd = open(argv[argc - 1], O_RDONLY)) < 0) { perror("grab[open]"); exit(1); }
if (ioctl(fd, EVIOCGRAB, 1)) { perror("grab[EVIOCGRAB]"); exit(1); }
printf("interrupt to exit\n");
while (1) sleep(1000); }
[unhandled content-type:application/pgp-signature] | |