Hi Ping, Peter,

are you sure that calling DeleteInputDeviceRequest is correct from 
xf86WcmUninit? It causes crash on my system. The problem is as follows:

1. Server calls CloseDownDevices (devices.c).
2. The method iterates inputInfo.devices and calls 
DeleteInputDeviceRequest(dev). Note the `next` variable assignment (next = 
dev->next) before the DeleteInputDeviceRequest is called.
3. DeleteInputDeviceRequest (xf86XInput.c) calls RemoveDevice
4. DeleteInputDeviceRequest calls UnInit of the device

When the DeleteInputDeviceRequest returns, the `next` is used as a parameter 
to next call to DeleteInputDeviceRequest. But if the driver in xf86WcmUninit 
frees all it's devices, the `next` might get freed (partially?) and the check

        xf86Input.c, 675: if(drv->UnInit)

fails with drv == NULL. Either the linuxwacom is doing something wrong, or 
xserver doesn't do the freeing right (the `next` shouldn't be necessary if the 
list's head device is freed until the list is empty).

Note that this is my analysis on the fact that "drv == NULL" in xf86Input.c 
during session shutdown. I might be wrong :-)

Cheers,
Oldřich.

------------------------------------------------------------------------------
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev 
_______________________________________________
Linuxwacom-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/linuxwacom-devel

Reply via email to