xserver-multidpi/hw/xfree86
Peter Hutterer d13cb97442 ddx: add new call to purge input devices that weren't added
Special case for the systemd-logind case in xfree86: when we're vt-switched
away and a device is plugged in, we get a paused fd from logind. Since we
can't probe the device or do anything with it, we store that device in the
xfree86 and handle it later when we vt-switch back. The device is not added to
inputInfo.devices until that time.

When the device is removed while still vt-switched away, the the config system
never notifies the DDX. It only runs through inputInfo.devices and our device
was never added to that.

When a device is plugged in, removed, and plugged in again while vt-switched
away, we have two entries in the xfree86-specific list that refer to the same
device node, both pending for addition later. On VT switch back, the first one
(the already removed one) will be added successfully, the second one (the
still plugged-in one) fails. Since the fd is correct, the device works until
it is removed again. The removed devices' config_info (i.e. the syspath)
doesn't match the actual device we addded tough (the input number increases
with each plug), it doesn't get removed, the fd remains open and we lose track
of the fd count. Plugging the device in again leads to a dead device.

Fix this by adding a call to notify the DDX to purge any remainders of devices
with the given config_info, that's the only identifiable bit we have at this
point.

https://bugs.freedesktop.org/show_bug.cgi?id=97928

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
2016-10-26 15:35:07 +10:00
..
common ddx: add new call to purge input devices that weren't added 2016-10-26 15:35:07 +10:00
ddc xfree86: small memory leaks fixes 2016-09-28 14:53:39 -04:00
dixmods configure.ac: remove --enable-aiglx option 2016-10-05 14:15:59 -04:00
doc xfree86: Unexport xf86Initialising, remove xf86ServerIsInitialising 2016-04-18 11:22:58 -04:00
dri xfree86/dri: remove libdrm runtime checks 2016-10-05 14:38:13 -04:00
dri2 xrandrprovider: Do not use separate lists for unbound / source / offload slaves 2016-06-17 11:35:58 +02:00
drivers modesetting: only fall back to drmModeSetCursor() on -EINVAL 2016-09-28 14:53:39 -04:00
exa build: Remove stale miext/cw include paths 2015-10-27 13:46:13 -04:00
fbdevhw fbdevhw: Fix a const qualifier warning 2015-09-23 15:18:24 -04:00
glamor_egl glamor: Share code for put_image handling. 2014-06-15 23:20:09 +01:00
i2c xfree86: Fix null pointer dereference 2016-09-28 14:53:39 -04:00
int10 x86emu: Change include order to avoid conflict with system header 2016-04-29 11:05:38 -04:00
loader xfree86: print the module name together with the load failure message 2016-08-24 08:30:10 +10:00
man xfree86: remove aiglx cmd/xorg.conf option 2016-10-05 14:15:52 -04:00
modes xf86RandR12: Fix XF86VidModeSetGamma triggering a BadImplementation error 2016-09-28 14:53:39 -04:00
os-support Switch poll() users to xserver_poll() 2016-07-21 15:04:36 -04:00
parser dix: Use OsSignal() not signal() 2016-06-08 11:36:31 -04:00
ramdac xf86Cursor: Take the input lock in xf86Set/MoveCursor 2016-10-13 18:31:23 +09:00
shadowfb Drop trailing whitespaces 2014-11-12 10:25:00 +10:00
utils xfree86: small memory leaks fixes 2016-09-28 14:53:39 -04:00
vbe xfree86: Change VBE version early-out to 1.2. (#22672) 2016-03-14 11:44:10 -04:00
vgahw Drop trailing whitespaces 2014-11-12 10:25:00 +10:00
x86emu x86emu: Change include order to avoid conflict with system header 2016-04-29 11:05:38 -04:00
.gitignore Xorg: Add Xorg.wrap to hw/xfree86/.gitignore 2014-04-18 11:39:16 +02:00
Makefile.am vidmode: move to a separate library of its own 2016-02-29 16:29:01 -05:00
sdksyms.sh dix: Switch to the libXfont2 API (v2) 2016-07-18 15:25:59 -04:00
xorg-wrapper.c Xorg.wrap: activate libdrm based detection for KMS drivers 2015-12-03 11:05:37 -05:00
Xorg.sh.in xfree86: rename Xorg.bin to Xorg 2015-01-05 09:53:58 +10:00
xorgconf.cpp xfree86: fix wrong DontZap documentation (#71113) 2014-05-24 20:02:56 +10:00