diff options
author | Werner Koch <wk@gnupg.org> | 2017-01-30 12:07:46 +0100 |
---|---|---|
committer | Werner Koch <wk@gnupg.org> | 2017-01-30 12:08:30 +0100 |
commit | 1ec7dc4e55a9eb84161ce42797924c2f928e2a8e (patch) | |
tree | 20eb946027d0303d91fde37b9944219f307884c8 /agent | |
parent | scd: Fix GetSlotStatus. (diff) | |
download | gnupg2-1ec7dc4e55a9eb84161ce42797924c2f928e2a8e.tar.xz gnupg2-1ec7dc4e55a9eb84161ce42797924c2f928e2a8e.zip |
Explain commit e175152ef7515921635bf1e00383e812668d13fc.
--
Diffstat (limited to 'agent')
-rw-r--r-- | agent/cache.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/agent/cache.c b/agent/cache.c index 248368277..4cb158c62 100644 --- a/agent/cache.c +++ b/agent/cache.c @@ -481,7 +481,15 @@ agent_store_cache_hit (const char *key) /* To make sure the update is atomic under the non-preemptive thread * model, we must make sure not to surrender control to a different * thread. Therefore, we avoid calling the allocator during the - * update. */ + * update. + * + * Background: xtrystrdup uses gcry_strdup which may use the secure + * memory allocator of Libgcrypt. That allocator takes locks and + * since version 1.14 libgpg-error is nPth aware and thus talking a + * lock may now lead to thread switch. Note that this only happens + * when secure memory is allocated, the standard allocator uses + * malloc which is not nPth aware. + */ new = key ? xtrystrdup (key) : NULL; /* Atomic update. */ |