mirror of
https://gitlab.freedesktop.org/xorg/xserver.git
synced 2026-06-19 04:18:27 +02:00
config client: fix minor race with event queue
Fix a small race whereby you could remove a device while events from it were still in the queue, by calling ProcessInputEvents immediately before RemoveDevice, to (hopefully) flush the event queue.
This commit is contained in:
parent
458c63a841
commit
7721ee308f
1 changed files with 4 additions and 0 deletions
|
|
@ -173,6 +173,10 @@ configMessage(DBusConnection *connection, DBusMessage *message, void *closure)
|
|||
return DBUS_HANDLER_RESULT_HANDLED;
|
||||
}
|
||||
ErrorF("pDev is %p\n", pDev);
|
||||
/* Call PIE here so we don't try to dereference a device that's
|
||||
* already been removed. Technically there's still a small race
|
||||
* here, so we should ensure that SIGIO is blocked. */
|
||||
ProcessInputEvents();
|
||||
RemoveDevice(pDev);
|
||||
dbus_error_free(&error);
|
||||
return DBUS_HANDLER_RESULT_HANDLED;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue