Re: [PATCH joystick] Remove old input ABI leftovers from jstkCoreUnInit
On Fri, Mar 18, 2011 at 07:13:38PM +0200, Timo Aaltonen wrote: From: Timo Aaltonen timo.aalto...@canonical.com Fixes crashes on device unplug: https://bugs.freedesktop.org/show_bug.cgi?id=35391 Signed-off-by: Timo Aaltonen timo.aalto...@canonical.com --- src/jstk.c |7 --- 1 files changed, 0 insertions(+), 7 deletions(-) diff --git a/src/jstk.c b/src/jstk.c index 9796a46..41cace7 100644 --- a/src/jstk.c +++ b/src/jstk.c @@ -622,13 +622,6 @@ jstkCoreUnInit(InputDriverPtrdrv, { JoystickDevPtr device = (JoystickDevPtr) pInfo-private; -if (device-keyboard_device != NULL) -{ -xf86DisableDevice(device-keyboard_device-dev, TRUE); -device-keyboard_device = NULL; -} that's not quite enough. we still support ABI 11. in theory anyway, I don't think either has been actually tested on a device. so the if condition removal should go into a ifdef ABI = 12 alternatively, you could just up the driver to only support ABI 12. as long as no-one steps up to maintain it, I'm happy to keep it in lockstep with the server at least. - -free (device); some comment explainig _why_ this fixes the crash in the commit message would have been nice. turns out that pInfo-private is shared between the keyboard device and the actual device and this would cause a double free. and the condition above is obsolete because with input ABI 12, devices that are hotplugged through the driver are removed by the server now. Cheers, Peter pInfo-private = NULL; xf86DeleteInput(pInfo, 0); } -- 1.7.4.1 ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
Re: [PATCH joystick] Remove old input ABI leftovers from jstkCoreUnInit
On 22.03.2011 08:42, Peter Hutterer wrote: On Fri, Mar 18, 2011 at 07:13:38PM +0200, Timo Aaltonen wrote: From: Timo Aaltonen timo.aalto...@canonical.com Fixes crashes on device unplug: https://bugs.freedesktop.org/show_bug.cgi?id=35391 Signed-off-by: Timo Aaltonen timo.aalto...@canonical.com --- src/jstk.c |7 --- 1 files changed, 0 insertions(+), 7 deletions(-) diff --git a/src/jstk.c b/src/jstk.c index 9796a46..41cace7 100644 --- a/src/jstk.c +++ b/src/jstk.c @@ -622,13 +622,6 @@ jstkCoreUnInit(InputDriverPtrdrv, { JoystickDevPtr device = (JoystickDevPtr) pInfo-private; -if (device-keyboard_device != NULL) -{ -xf86DisableDevice(device-keyboard_device-dev, TRUE); -device-keyboard_device = NULL; -} that's not quite enough. we still support ABI 11. in theory anyway, I don't think either has been actually tested on a device. so the if condition removal should go into a ifdef ABI = 12 alternatively, you could just up the driver to only support ABI 12. as long as no-one steps up to maintain it, I'm happy to keep it in lockstep with the server at least. Duh, yes.. I misread the commit log. Pre-ABI 11 support was dropped earlier, so I'll add the ifdef. - -free (device); some comment explainig _why_ this fixes the crash in the commit message would have been nice. turns out that pInfo-private is shared between the keyboard device and the actual device and this would cause a double free. and the condition above is obsolete because with input ABI 12, devices that are hotplugged through the driver are removed by the server now. Right, I'll make it more clear in the next version. t ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
[PATCH joystick] Remove old input ABI leftovers from jstkCoreUnInit
From: Timo Aaltonen timo.aalto...@canonical.com Fixes crashes on device unplug: https://bugs.freedesktop.org/show_bug.cgi?id=35391 Signed-off-by: Timo Aaltonen timo.aalto...@canonical.com --- src/jstk.c |7 --- 1 files changed, 0 insertions(+), 7 deletions(-) diff --git a/src/jstk.c b/src/jstk.c index 9796a46..41cace7 100644 --- a/src/jstk.c +++ b/src/jstk.c @@ -622,13 +622,6 @@ jstkCoreUnInit(InputDriverPtrdrv, { JoystickDevPtr device = (JoystickDevPtr) pInfo-private; -if (device-keyboard_device != NULL) -{ -xf86DisableDevice(device-keyboard_device-dev, TRUE); -device-keyboard_device = NULL; -} - -free (device); pInfo-private = NULL; xf86DeleteInput(pInfo, 0); } -- 1.7.4.1 ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel