[Libguestfs] [PATCH nbdkit] server/locks: Allow lock_request to be called when there is no current conn.
Eric Blake
eblake at redhat.com
Tue Apr 28 17:29:47 UTC 2020
On 4/28/20 11:45 AM, Richard W.M. Jones wrote:
> On Haiku tests/test-socket-activation failed with:
>
> nbdkit: locks.c:96:lock_request: conn != NULL
>
> called from server/sockets.c: accept_connection
> in the fallback path which does:
> lock_request ();
> thread_data->sock = set_cloexec (accept (listen_sock, NULL, NULL));
> unlock_request ()
>
> Because there is no current connection in this thread this code fails.
>
> However it should be possible to call lock_request without a
> connection, provided that
> thread_model <= NBDKIT_THREAD_MODEL_SERIALIZE_REQUESTS (which it is
> when the fallback path is engaged on Haiku). There was a regression
> caused when I modified to code to use an implicit TLS connection.
>
> Fixes commit 91023f269d4cea56f573a1aa0d880b12052f6e1e.
> ---
> server/locks.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
ACK
--
Eric Blake, Principal Software Engineer
Red Hat, Inc. +1-919-301-3226
Virtualization: qemu.org | libvirt.org
More information about the Libguestfs
mailing list