Home GnuPG
Diffusion GnuPG 47106ac435e8

scd: Serialize opening device by select_application.

Description

scd: Serialize opening device by select_application.

* scd/app.c (app_new_register): Don't lock APP_LIST_LOCK here.
(select_application): Lock with APP_LIST_LOCK earlier.

What we want to do here is to serialize the call of
select_application. In the old code, it was possible
that a call of select_application was blocked internally,
and then another call of select_application entered.

We can have a dedicated lock for call of select_application,
but it is easier to re-use APP_LIST_LOCK.

  • Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>

Details

Provenance
gniibeAuthored on Nov 28 2018, 6:59 AM
Parents
rG483e63f9b5fa: agent: Better serialization for scdaemon access.
Branches
Unknown
Tags
Unknown