[PATCH] Handle input device cleanups in case of segfaults better

Peter Hutterer peter.hutterer at who-t.net
Tue Jan 29 19:20:04 PST 2013


If a segfault or other error occurs, the previous code would call
CloseDownDevices(). That started the normal device removal process which
includes cleaning up a fair bit and also sending events. None of that is
appropriate from the signal handler, especially if we're about to die
anyway.

Shortcut the whole process, simply calling into the driver's DeviceProc with
a new DEVICE_ABORT mode to tell the driver to clean up. This is only needed
by devices that are directly handled by the driver.

This avoids relatively common double-crashes: something triggers a segfault,
and then in the cleanup the input code triggers another one which is then
filed as bug.

Cheers, 
  Peter



More information about the xorg-devel mailing list