[PATCH xserver 2/2] Hold input lock while calling input device SetProperty callback

Keith Packard keithp at keithp.com
Thu Sep 8 17:02:31 UTC 2016


This keeps the input driver SetProperty function from being called
while input events are being processed.

Signed-off-by: Keith Packard <keithp at keithp.com>
---
 Xi/xiproperty.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/Xi/xiproperty.c b/Xi/xiproperty.c
index 26d1206..b7a1f59 100644
--- a/Xi/xiproperty.c
+++ b/Xi/xiproperty.c
@@ -769,8 +769,10 @@ XIChangeDeviceProperty(DeviceIntPtr dev, Atom property, Atom type,
                 handler = dev->properties.handlers;
                 while (handler) {
                     if (handler->SetProperty) {
+                        input_lock();
                         rc = handler->SetProperty(dev, prop->propertyName,
                                                   &new_value, checkonly);
+                        input_unlock();
                         if (checkonly && rc != Success) {
                             free(new_value.data);
                             if (add)
-- 
2.8.1



More information about the xorg-devel mailing list