Page MenuHome GnuPG

gpg-agent cache handling serialization

Authored by gniibe on Apr 6 2017, 4:43 AM.


Diff Detail

rG GnuPG
Lint Skipped
Unit Tests Skipped

Event Timeline

werner added a subscriber: werner.

Re-purposing the encryption lock would have been my suggestion as well.

Some context is missing but I assume the patch is okay.

Background: We now have npth aware locks in libgpg-error. Libgcrypt thus got nPth support en passant which lead to the problems with code like

xfree (foo);
foo = xmalloc (100);

because both, xfree and xmalloc, might be implemented by Libgcrypt and thus employs locks and so may introduce a thread switch,
Note that even xfree uses a lock because it needs to check whether the to be released memory is in one of the secure memory areas.
before that change in libgpg-error the malloc functions were not considered functions triggering a thread switch,

This revision is now accepted and ready to land.Apr 6 2017, 9:44 AM