aboutsummaryrefslogtreecommitdiff
path: root/authz
diff options
context:
space:
mode:
authorPeter Xu <peterx@redhat.com>2021-07-22 13:58:38 -0400
committerDr. David Alan Gilbert <dgilbert@redhat.com>2021-07-26 12:44:46 +0100
commit43044ac0ee5758d92b639843c045123c2de578d1 (patch)
tree96306626794702162548c8f6feab71ca24821b37 /authz
parent53021ea1659b8a9074c6f5eb6c65a4e5dddddaec (diff)
migration: Make from_dst_file accesses thread-safe
Accessing from_dst_file is potentially racy in current code base like below: if (s->from_dst_file) do_something(s->from_dst_file); Because from_dst_file can be reset right after the check in another thread (rp_thread). One example is migrate_fd_cancel(). Use the same qemu_file_lock to protect it too, just like to_dst_file. When it's safe to access without lock, comment it. There's one special reference in migration_thread() that can be replaced by the newly introduced rp_thread_created flag. Reported-by: Dr. David Alan Gilbert <dgilbert@redhat.com> Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com> Signed-off-by: Peter Xu <peterx@redhat.com> Reviewed-by: Lukas Straub <lukasstraub2@web.de> Message-Id: <20210722175841.938739-3-peterx@redhat.com> Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com> with Peter's fixup
Diffstat (limited to 'authz')
0 files changed, 0 insertions, 0 deletions