[PATCH xserver] os: don't re-remove an already removed fd

Keith Packard keithp at keithp.com
Thu Aug 11 05:13:31 UTC 2016


Peter Hutterer <peter.hutterer at who-t.net> writes:

> If a driver calls xf86RemoveEnabledDevice() twice for the same fd we race with
> InputThreadDoWork(). If it gets called in between both fd entries are removed.
> If InputThreadDoWork() does not get called in between, we merely try to remove
> the same fd twice and then cause a read_input() call on an already removed
> device later.

Some driver actually counts on being able to register the same FD
multiple times?  Only one of the functions will get called, so wouldn't
it be better to not allow the registration in the first place?

-- 
-keith
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 810 bytes
Desc: not available
URL: <https://lists.x.org/archives/xorg-devel/attachments/20160810/b1103621/attachment.sig>


More information about the xorg-devel mailing list