]> git.proxmox.com Git - mirror_qemu.git/commit - block/curl.c
curl: never invoke callbacks with s->mutex held
authorPaolo Bonzini <pbonzini@redhat.com>
Mon, 15 May 2017 10:00:54 +0000 (12:00 +0200)
committerJeff Cody <jcody@redhat.com>
Tue, 16 May 2017 14:34:17 +0000 (10:34 -0400)
commit34db05e7ffe8d61ca7288b9532ad6e8300853318
treec62780f726cfa639dbdbaee15c64169628dee9c1
parent675a775633e68bf8b426a896fea5b93a4f4ff1cc
curl: never invoke callbacks with s->mutex held

All curl callbacks go through curl_multi_do, and hence are called with
s->mutex held.  Note that with comments, and make curl_read_cb drop the
lock before invoking the callback.

Likewise for curl_find_buf, where the callback can be invoked by the
caller.

Cc: qemu-stable@nongnu.org
Reviewed-by: Jeff Cody <jcody@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: Max Reitz <mreitz@redhat.com>
Message-id: 20170515100059.15795-3-pbonzini@redhat.com
Signed-off-by: Jeff Cody <jcody@redhat.com>
block/curl.c