[PATCH] dix: block signals when closing all devices

Julien Cristau jcristau at debian.org
Fri Oct 28 03:43:37 PDT 2011


On Fri, Oct 28, 2011 at 08:00:14 +1000, Peter Hutterer wrote:

> When closing down all devices, we manually unset master for all attached
> devices, but the device's sprite info still points to the master's sprite
> info. This leaves us a window where the master is freed already but the
> device isn't yet. A signal during that window causes dereference of the
> already freed spriteInfo in mieqEnqueue's EnqueueScreen macro.
> 
> Simply block signals when removing all devices. It's not like we're really
> worrying about high-responsive input at this stage.
> 
> https://bugzilla.redhat.com/show_bug.cgi?id=737031
> 
> Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
> Tested-by: Paulo Zanoni <paulo.r.zanoni at intel.com>
> ---
> The more correct approach would be to loop through inputInfo.devices twice,
> removing all slaves first and then the masters. But really, if you're
> expecting input events to be delivered while we're shutting down all devices
> you're going to be disappointed anyway.
> 
Sounds reasonable.

Reviewed-by: Julien Cristau <jcristau at debian.org>

Cheers,
Julien


More information about the xorg-devel mailing list