2df2815d6a
xf86AddEnabledDevice() prepends the new fd to the list, xf86RemoveEnabledDevice() then searches for a matching fd and removes that entry. If this is done for the same fd (and since we lose all information but the actual fd) we usually unregister virtual devices in reverse order, causing a dereference of already released memory. Case in point: - the wacom driver calls xf86AddEnabledDevice() once for the physical device, then multiple times for the virtual subdevices - when the physical device is unplugged, the driver calls xf86RemoveEnabledDevice() for the physical device - all we have is the fd, so we end up removing the last virtual device from the fd set - xf86DeleteInput() frees the physical device's pInfo - the fd goes crazy with ENODEV, but a read_input() now passes the already freed pInfo for the physical device - boom Fix this by appending to the fd list to provide bug-for-bug compatibility with the old SIGIO code. This needs to be fixed in the driver, but meanwhile not crashing the server provides for better user experience. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Keith Packard <keithp@keithp.com> |
||
---|---|---|
composite | ||
config | ||
damageext | ||
dbe | ||
dix | ||
doc | ||
dri3 | ||
exa | ||
fb | ||
glamor | ||
glx | ||
hw | ||
include | ||
m4 | ||
man | ||
mi | ||
miext | ||
os | ||
present | ||
pseudoramiX | ||
randr | ||
record | ||
render | ||
test | ||
Xext | ||
xfixes | ||
Xi | ||
xkb | ||
.dir-locals.el | ||
.gitignore | ||
autogen.sh | ||
configure.ac | ||
COPYING | ||
devbook.am | ||
docbook.am | ||
fix-miregion | ||
fix-miregion-private | ||
fix-patch-whitespace | ||
fix-region | ||
Makefile.am | ||
manpages.am | ||
README | ||
xorg-server.m4 | ||
xorg-server.pc.in | ||
xserver.ent.in |
X Server The X server accepts requests from client applications to create windows, which are (normally rectangular) "virtual screens" that the client program can draw into. Windows are then composed on the actual screen by the X server (or by a separate composite manager) as directed by the window manager, which usually communicates with the user via graphical controls such as buttons and draggable titlebars and borders. For a comprehensive overview of X Server and X Window System, consult the following article: http://en.wikipedia.org/wiki/X_server All questions regarding this software should be directed at the Xorg mailing list: http://lists.freedesktop.org/mailman/listinfo/xorg Please submit bug reports to the Xorg bugzilla: https://bugs.freedesktop.org/enter_bug.cgi?product=xorg The master development code repository can be found at: git://anongit.freedesktop.org/git/xorg/xserver http://cgit.freedesktop.org/xorg/xserver For patch submission instructions, see: http://www.x.org/wiki/Development/Documentation/SubmittingPatches For more information on the git code manager, see: http://wiki.x.org/wiki/GitPage