[lkml]   [2008]   [Apr]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH] evdev: Release eventual input device grabs when getting disconnected
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.


#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");

if ((fd = open(argv[argc - 1], O_RDONLY)) < 0) {

if (ioctl(fd, EVIOCGRAB, 1)) {

printf("interrupt to exit\n");

while (1)

[unhandled content-type:application/pgp-signature]
 \ /
  Last update: 2008-04-01 13:51    [W:0.123 / U:2.296 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site