migration: Stop postcopy fault thread before notifying
commit55d0fe8254984321a126efd8db358f754737aa63
authorIlya Maximets <i.maximets@samsung.com>
Mon, 8 Oct 2018 16:05:35 +0000 (8 19:05 +0300)
committerDr. David Alan Gilbert <dgilbert@redhat.com>
Thu, 11 Oct 2018 18:58:26 +0000 (11 19:58 +0100)
tree77d33f8e7098ea82fa3d46393bd46b61294849ad
parent5571dc824b3a8b9e890caa721a6938970e7596ed
migration: Stop postcopy fault thread before notifying

POSTCOPY_NOTIFY_INBOUND_END handlers will remove userfault fds
from the postcopy_remote_fds array which could be still in
use by the fault thread. Let's stop the thread before
notification to avoid possible accessing wrong memory.

Fixes: 46343570c06e ("vhost+postcopy: Wire up POSTCOPY_END notify")
Cc: qemu-stable@nongnu.org
Signed-off-by: Ilya Maximets <i.maximets@samsung.com>
Message-Id: <20181008160536.6332-2-i.maximets@samsung.com>
Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
migration/postcopy-ram.c