[PATCH] DeepCopyPointerClasses should not copy kbdfeed->CtrlProc

Peter Hutterer peter.hutterer at who-t.net
Thu Aug 12 18:08:54 PDT 2010


On Thu, Aug 12, 2010 at 12:09:00AM -0700, Alan Coopersmith wrote:
> The pointer drivers that have anything other than a no-op there assume
> the device passed to CtrlProc on has their flavor of devicePrivate,
> which the Virtual Core Pointer won't.
> 
> Fixes Solaris bug 6950572:
>  X mouse driver crashes Xorg during unplug-plug the usb mouse device
>  http://bugs.opensolaris.org/bugdatabase/view_bug.do?bug_id=6950572
> 
> Signed-off-by: Alan Coopersmith <alan.coopersmith at oracle.com>
> ---
> 
> Leaves the open question of whether any of Xi's DeepCopy* functions should
> be copying the CtrlProc pointers or if the ones for other device classes
> make similar assumptions.

I'm not quite comfortable with this patch, I don't think it solves the right
issue. the devicePrivate is copied into the MD as well, so that should in
theory work (though I admit much of that code was achieved by
trial-and-error). Looks more like a dangling pointer that should be
addressed otherwise.

Either way, the feedback copying requires some deeper look and thought so
I'm hoping the second patch alone will work around the immediate issue above.

Cheers,
  Peter
> 
>  Xi/exevents.c |    1 -
>  1 files changed, 0 insertions(+), 1 deletions(-)
> 
> diff --git a/Xi/exevents.c b/Xi/exevents.c
> index e990aeb..02e5d57 100644
> --- a/Xi/exevents.c
> +++ b/Xi/exevents.c
> @@ -520,7 +520,6 @@ DeepCopyPointerClasses(DeviceIntPtr from, DeviceIntPtr to)
>                      return;
>                  }
>              }
> -            (*p)->CtrlProc = it->CtrlProc;
>              (*p)->ctrl     = it->ctrl;
>  
>              p = &(*p)->next;
> -- 
> 1.5.6.5
> 


More information about the xorg-devel mailing list