]> git.proxmox.com Git - mirror_qemu.git/commit
curl: never invoke callbacks with s->mutex held
authorPaolo Bonzini <pbonzini@redhat.com>
Mon, 15 May 2017 10:00:54 +0000 (12:00 +0200)
committerMichael Roth <mdroth@linux.vnet.ibm.com>
Thu, 3 Aug 2017 19:32:52 +0000 (14:32 -0500)
commit4b519b9fd7c5e3d0107243ff776c0b5086ff2f4f
tree12b4e6d2860b229c5bdec953c2e56550ccc35294
parentf00c08cbac63f452cc0828f60345a62cc175daa2
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>
(cherry picked from commit 34db05e7ffe8d61ca7288b9532ad6e8300853318)
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
block/curl.c