[PATCH] dix: FakeClientID for implicit passive grabs

Keith Packard keithp at keithp.com
Tue Nov 27 11:21:15 PST 2012


>  Using client->clientAsMask as resource for implicit passive grabs causes
>  resource conflict with client-allocated resources. Freeing the passive grab
>  frees all resources with that ID, so arbitrary resources can get freed while
>  still in use. This causes random crashes.

I've come up with an alternate method to resolve the problem in
RetrieveTouchDeliveryData -- instead of using the resource database to
go find the grab structure, I just stuck a pointer in the
TouchListener directly. This also offered the opportunity to clean up
the num_grab counting a bit.

The first patch in this series pulls the TouchListener structure
declaration to the top-level, the second patch is the interesting one.

 [PATCH 1/2] input: Pull TouchListener declaration to top-level
 [PATCH 2/2] input: Record grab pointer in TouchListener

-keith


More information about the xorg-devel mailing list