[xf86-input-evdev][PATCH] links to event nodes

Christian Aistleitner kpdh2t at gmx.net
Wed Feb 28 15:19:47 PST 2007


I use xf86-input-evdev 1.1.5.

If there is some (symbolic) link
pointing towards
and the xorg config file uses the device described by either of these two  
files, the result is a segfault at startup of the xorg server.
I know it's rather evil to have such a link in /dev/input in first place.

Within the funciton EvdevCorePreInit of src/evdev.ce, evdevNewDriver is  
called. This (among other things) calls evdevScanDevice for
and also for the device of
. The first of these two calls succeed. In the second call, the message  
DEVICE_ON is sent to the device->pInfo->dev via device->callback. But as  
device->pInfo->dev has not yet been initialized, it is still NULL.
When calling the callback, the first line of EvdevProc of src/evdev.c  
tries to evaluate
, where device now resolves to NULL as described above. Hence a segfault.

The attached patch adds a sanity check to the message handling function  
EvdevProc of src/evdev.c and resolves the problem.

Kind regards,
-------------- next part --------------
A non-text attachment was scrubbed...
Name: fix_dev_links.diff
Type: application/octet-stream
Size: 361 bytes
Desc: not available
URL: <http://lists.x.org/archives/xorg/attachments/20070301/1c224d8a/attachment.obj>

More information about the xorg mailing list