Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix potential data race in the PC/SC-based reader tracker #125

Open
emaxx-google opened this issue Jun 18, 2020 · 1 comment
Open

Fix potential data race in the PC/SC-based reader tracker #125

emaxx-google opened this issue Jun 18, 2020 · 1 comment
Labels

Comments

@emaxx-google
Copy link
Collaborator

We have the functionality that tracks the list of currently available smart card readers based on the information exposed by the PC/SC API.
This implementation has a potential data race that it can miss the changes if they happen between the completion of one PC/SC call and the beginning of the next one. In that case, the change would only be recognized after some time (60 seconds at worst with the current implementation). This bug tracks the fix of this data race.

After this data race gets fixed, we could actually make a small performance improvement by avoiding the need to make a periodic PC/SC call (every 60 seconds currently) from that code.

@emaxx-google
Copy link
Collaborator Author

Now this can be solved in a relatively simple way, using the recent improvement landed in PC/SC-Lite: https://blog.apdu.fr/posts/2024/08/improved-scardgetstatuschange-for-pnpnotification-special-reader/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant