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

xorg-server: Changes to 'ubuntu'



 debian/changelog               |    7 +++++++
 hw/xfree86/common/xf86Config.c |    8 --------
 hw/xfree86/common/xf86Init.c   |   31 ++++++++++++++++++++++++++++---
 3 files changed, 35 insertions(+), 11 deletions(-)

New commits:
commit 3a70935e497c908419a2704e699e615d148718d3
Author: Chase Douglas <chase.douglas@ubuntu.com>
Date:   Fri Mar 23 17:27:57 2012 -0700

    Fix crash at startup due to input option abi break (LP: #931397)
    
    * Fix crash at startup due to input option abi break (LP: #931397)
      - Revert two commits from upstream 1.12 input stack

diff --git a/debian/changelog b/debian/changelog
index 4bc443c..07f3208 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,10 @@
+xorg-server (2:1.11.4-0ubuntu8) UNRELEASED; urgency=low
+
+  * Fix crash at startup due to input option abi break (LP: #931397)
+    - Revert two commits from upstream 1.12 input stack
+
+ -- Chase Douglas <chase.douglas@ubuntu.com>  Fri, 23 Mar 2012 17:26:12 -0700
+
 xorg-server (2:1.11.4-0ubuntu7) precise; urgency=low
 
   * debian/patches/111_armel-drv-fallbacks.patch:

commit c3eea9872d90bd64bf1470518553ccdb80a85ce6
Author: Chase Douglas <chase.douglas@ubuntu.com>
Date:   Fri Mar 23 17:25:04 2012 -0700

    Revert "xfree86: use NewInputDeviceRequest for xorg.conf devices too"
    
    This commit uses the new 1.12 input option abi. We are sticking with the
    1.11 option abi. This ends up causing memory corruption and segfaults.
    
    This reverts commit 7ee1621364d2b6230bb1c02bbdb5b6abb74ad2ff.
    
    Signed-off-by: Chase Douglas <chase.douglas@ubuntu.com>

diff --git a/hw/xfree86/common/xf86Config.c b/hw/xfree86/common/xf86Config.c
index f93724b..b831d9a 100644
--- a/hw/xfree86/common/xf86Config.c
+++ b/hw/xfree86/common/xf86Config.c
@@ -1239,10 +1239,6 @@ checkCoreInputDevices(serverLayoutPtr servlayoutp, Bool implicitLayout)
 	if (foundPointer) {
 	    Pointer->options = xf86AddNewOption(Pointer->options,
 					        "CorePointer", "on");
-	    Pointer->options = xf86AddNewOption(Pointer->options,
-						"driver", confInput->inp_driver);
-	    Pointer->options = xf86AddNewOption(Pointer->options,
-						"identifier", confInput->inp_identifier);
 	    servlayoutp->inputs = addDevice(servlayoutp->inputs, Pointer);
 	}
     }
@@ -1333,10 +1329,6 @@ checkCoreInputDevices(serverLayoutPtr servlayoutp, Bool implicitLayout)
 	if (foundKeyboard) {
 	    Keyboard->options = xf86AddNewOption(Keyboard->options,
 						 "CoreKeyboard", "on");
-	    Keyboard->options = xf86AddNewOption(Keyboard->options,
-						 "driver", confInput->inp_driver);
-	    Keyboard->options = xf86AddNewOption(Keyboard->options,
-						 "identifier", confInput->inp_identifier);
 	    servlayoutp->inputs = addDevice(servlayoutp->inputs, Keyboard);
 	}
     }
diff --git a/hw/xfree86/common/xf86Init.c b/hw/xfree86/common/xf86Init.c
index e4abfae..5ee68cd 100644
--- a/hw/xfree86/common/xf86Init.c
+++ b/hw/xfree86/common/xf86Init.c
@@ -791,6 +791,21 @@ InitOutput(ScreenInfo *pScreenInfo, int argc, char **argv)
 				 NULL);
 }
 
+static InputInfoPtr
+duplicateDevice(InputInfoPtr pInfo)
+{
+    InputInfoPtr dup = calloc(1, sizeof(InputInfoRec));
+    if (dup) {
+        dup->name = strdup(pInfo->name);
+        dup->driver = strdup(pInfo->driver);
+        dup->options = xf86OptionListDuplicate(pInfo->options);
+        /* type_name is a const string */
+        dup->type_name = pInfo->type_name;
+        dup->fd = -1;
+    }
+    return dup;
+}
+
 /**
  * Initialize all supported input devices present and referenced in the
  * xorg.conf.
@@ -807,8 +822,20 @@ InitInput(int argc, char **argv)
 
     /* Initialize all configured input devices */
     for (pInfo = xf86ConfigLayout.inputs; pInfo && *pInfo; pInfo++) {
+        InputInfoPtr dup;
+        /* Replace obsolete keyboard driver with kbd */
+        if (!xf86NameCmp((*pInfo)->driver, "keyboard")) {
+            strcpy((*pInfo)->driver, "kbd");
+        }
+
+        /* Data passed into xf86NewInputDevice will be freed on shutdown.
+         * Duplicate from xf86ConfigLayout.inputs, otherwise we don't have any
+         * xorg.conf input devices in the second generation
+         */
+        dup = duplicateDevice(*pInfo);
+
         /* If one fails, the others will too */
-        if (NewInputDeviceRequest((*pInfo)->options, NULL, &dev) == BadAlloc)
+        if (xf86NewInputDevice(dup, &dev, TRUE) == BadAlloc)
             break;
     }
 

commit f9a799a5c022d36bf02fe6ac397ef75e40c0e530
Author: Chase Douglas <chase.douglas@ubuntu.com>
Date:   Fri Mar 23 17:23:41 2012 -0700

    Revert "xfree86: duplicate name and driver from pInfo for NewInputDeviceRequest"
    
    This commit uses the new 1.12 input option abi. We are sticking with the
    1.11 option abi. This ends up causing memory corruption and segfaults.
    
    This reverts commit 4b7dd4523c11ef4952b78e4164b2fa7b34588867.
    
    Signed-off-by: Chase Douglas <chase.douglas@ubuntu.com>

diff --git a/hw/xfree86/common/xf86Init.c b/hw/xfree86/common/xf86Init.c
index 0a47140..e4abfae 100644
--- a/hw/xfree86/common/xf86Init.c
+++ b/hw/xfree86/common/xf86Init.c
@@ -807,8 +807,6 @@ InitInput(int argc, char **argv)
 
     /* Initialize all configured input devices */
     for (pInfo = xf86ConfigLayout.inputs; pInfo && *pInfo; pInfo++) {
-        (*pInfo)->options = xf86AddNewOption((*pInfo)->options, "driver", (*pInfo)->driver);
-        (*pInfo)->options = xf86AddNewOption((*pInfo)->options, "identifier", (*pInfo)->name);
         /* If one fails, the others will too */
         if (NewInputDeviceRequest((*pInfo)->options, NULL, &dev) == BadAlloc)
             break;


Reply to: