[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH] crypto: fix initialization of gcrypt threading
From: |
Eric Blake |
Subject: |
Re: [Qemu-devel] [PATCH] crypto: fix initialization of gcrypt threading |
Date: |
Mon, 10 Oct 2016 08:35:11 -0500 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.3.0 |
On 10/10/2016 06:41 AM, Daniel P. Berrange wrote:
> The gcrypt threads implementation must be set before calling
> gcry_check_version, since that triggers initialization of
> the random pool. After that is initialized, changes to the
> threads impl won't be honoured by the random pool code. This
> means that gcrypt will thing thread locking is needed and
s/thing/think/
> so try to acquire the random pool mutex, but this is NULL
> as no threads impl was set originally. This results in a
> crash in the random pool code.
>
> For the same reasons, gnutls_init must be done after QEMU
> initializes gcrypt, since gnutls will itself calling the
> gcry_check_version function.
>
> Signed-off-by: Daniel P. Berrange <address@hidden>
> ---
>
> In combination with my previous test case fix, this should
> make unit tests pass again on RHEL6 platforms with gcrypt
> instead of nettle
>
Reviewed-by: Eric Blake <address@hidden>
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature