diff options
| author | NIIBE Yutaka <[email protected]> | 2020-11-05 06:10:18 +0000 |
|---|---|---|
| committer | NIIBE Yutaka <[email protected]> | 2020-11-05 07:10:15 +0000 |
| commit | 484bafda4dbf5ffe9e7c41ef24fbc5bd791a3b32 (patch) | |
| tree | 92c0293db2d5df534a08a0ba9c0f7963bdf5300a /g10/misc.c | |
| parent | speedo,w32: Install gpg-check-pattern and example profiles. (diff) | |
| download | gnupg-484bafda4dbf5ffe9e7c41ef24fbc5bd791a3b32.tar.gz gnupg-484bafda4dbf5ffe9e7c41ef24fbc5bd791a3b32.zip | |
scd: Internal CCID driver: Fix a race condition on close.
* scd/ccid-driver.c (ccid_require_get_status): For VENDOR_SCM reader,
return 0 only at the initial call.
(bulk_in): Don't detect an error for VENDOR_SCM reader, just kicking
the loop, to invoke scd_update_reader_status_file, which calls
ccid_slot_status again.
(ccid_slot_status): Move the call of ccid_vendor_specific_setup to...
(ccid_get_atr): ... here.
--
For readers with interrupt transfer support, it is only intr_cb which
sets handle->powered_off to 1. Keeping this condition makes no race.
The function ccid_slot_status can also detect a communication error,
which causes apdu_close_reader (but not setting ->powered_off).
GnuPG-bug-id: 5121
Fixes-commit: 920f258eb6018ecec1d63bad6a0fb0772f72affa
Signed-off-by: NIIBE Yutaka <[email protected]>
Diffstat (limited to 'g10/misc.c')
0 files changed, 0 insertions, 0 deletions
