migration/multifd: Make multifd_send() thread safe
authorMaciej S. Szmigiero <maciej.szmigiero@oracle.com>
Tue, 4 Mar 2025 22:03:39 +0000 (23:03 +0100)
committerCédric Le Goater <clg@redhat.com>
Thu, 6 Mar 2025 05:47:33 +0000 (06:47 +0100)
commitd19cc4dca0b21af95fee36a2ddad34eb4bd6b67f
tree10081d96a50976b078b3f6b23bc37986e0234afa
parentf588f3c46ae278661cdad5f1198a455e3ec9f910
migration/multifd: Make multifd_send() thread safe

multifd_send() function is currently not thread safe, make it thread safe
by holding a lock during its execution.

This way it will be possible to safely call it concurrently from multiple
threads.

Reviewed-by: Peter Xu <peterx@redhat.com>
Signed-off-by: Maciej S. Szmigiero <maciej.szmigiero@oracle.com>
Link: https://lore.kernel.org/qemu-devel/dd0f3bcc02ca96a7d523ca58ea69e495a33b453b.1741124640.git.maciej.szmigiero@oracle.com
Signed-off-by: Cédric Le Goater <clg@redhat.com>
migration/multifd.c