[PATCH 2/5] xkb: Guard against SIGIO updates during PointerKeys.

Simon Thum simon.thum at gmx.de
Wed Apr 14 12:58:13 PDT 2010


Am 14.04.2010 03:08, schrieb Peter Hutterer:
> In theory, an event coming in during GPE could reset our lastSlave, leading
> to rather interesting events lateron.
Reviewed-by: Simon Thum <simon.thum at gmx.de>

FWIW, mipointer.c:580 (or so, not the current source) features another
GPE invocation without protection. Also xtest, but I think that case is
safe.

Cheers,

Simon


> 
> Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
> ---
>  xkb/ddxDevBtn.c |    3 ++-
>  1 files changed, 2 insertions(+), 1 deletions(-)
> 
> diff --git a/xkb/ddxDevBtn.c b/xkb/ddxDevBtn.c
> index 3bee84b..b8a222d 100644
> --- a/xkb/ddxDevBtn.c
> +++ b/xkb/ddxDevBtn.c
> @@ -64,11 +64,12 @@ XkbDDXFakeDeviceButton(DeviceIntPtr dev,Bool press,int button)
>          return;
>  
>      events = InitEventList(GetMaximumEventsNum());
> +    OsBlockSignals();
>      nevents = GetPointerEvents(events, ptr,
>                                 press ? ButtonPress : ButtonRelease, button,
>                                 0 /* flags */, 0 /* first */,
>                                 0 /* num_val */, NULL);
> -
> +    OsReleaseSignals();
>  
>      for (i = 0; i < nevents; i++)
>          mieqProcessDeviceEvent(ptr, (InternalEvent*)events[i].event, NULL);



More information about the xorg-devel mailing list