[Pcsclite-muscle] Rare race condition in SCardGetStatusChange()

Maksim Ivanov emaxx at google.com
Tue Apr 17 13:21:18 PDT 2018


Hello,

Sorry, I haven't looked closely through the proposed patch, although
the bug explanation seems convincing.

My two cents: breaking the protocol's binary compatibility is an
unfortunate change to do. This will likely require issuing a new major
version of PCSC-Lite; and as switching of significant part of client
applications onto this new version will definitely take a while, this
may result in having to support two major versions in parallel for a
long time.
So I think it makes sense to investigate more whether some other
approaches are possible, which don't require backwards-incompatible
protocol changes.

For example, a simple workaround would be to make the polling interval
exponentially growing (starting, for instance, from 1 second, or even
from 0.1 second, and being capped at 60 sec), instead of being fixed
at 60 seconds.
This, obviously, won't be a real solution for the data race - the
worst-case scenario of 60 seconds of waiting would still be possible -
but should help in cases like the one described in the initial message
(IIUC).


Regards,
Maksim



More information about the pcsclite-muscle mailing list