← Back to team overview

ubuntu-x-swat team mailing list archive

[Bug 767159] Re: udevadm trigger --action=change crashes X.Org Server

 

My first instinct would be to try the following patch.  Looking at the
server source code I don't think that read_input will be called in a
loop if it returns without doing anything, and I would assume that the
server will get notification from udev on a separate path to trigger
device removal even if this path is not taken.  I would definitely ask
on xorg-devel first though.

$ diff -ud xserver-xorg-input-evdev-2.6.0/src/evdev.c xserver-xorg-input-evdev-2.6.0/src/evdev.c.new
--- xserver-xorg-input-evdev-2.6.0/src/evdev.c	2011-01-05 23:35:27.000000000 +0100
+++ xserver-xorg-input-evdev-2.6.0/src/evdev.c.new	2011-11-09 12:13:52.945717560 +0100
@@ -864,13 +864,8 @@
         len = read(pInfo->fd, &ev, sizeof(ev));
         if (len <= 0)
         {
-            if (errno == ENODEV) /* May happen after resume */
-            {
-                EvdevMBEmuFinalize(pInfo);
-                xf86RemoveEnabledDevice(pInfo);
-                close(pInfo->fd);
-                pInfo->fd = -1;
-            } else if (errno != EAGAIN)
+            if (errno != EAGAIN && errno != ENODEV)
+            /* ENODEV may happen after resume */
             {
                 /* We use X_NONE here because it doesn't alloc */
                 xf86MsgVerb(X_NONE, 0, "%s: Read error: %s\n", pInfo->name,

-- 
You received this bug notification because you are a member of Ubuntu-X,
which is subscribed to xorg-server in Ubuntu.
https://bugs.launchpad.net/bugs/767159

Title:
  udevadm trigger --action=change crashes X.Org Server

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/xorg-server/+bug/767159/+subscriptions


References