diff options
| author | Richard Henderson <richard.henderson@linaro.org> | 2021-11-06 19:43:42 -0400 |
|---|---|---|
| committer | Richard Henderson <richard.henderson@linaro.org> | 2021-11-06 19:43:42 -0400 |
| commit | 63ed851de474b1e2458cb9b4ba6e02a88f72c25c (patch) | |
| tree | 9c9b5c11b173be8fcc80caca7e92a69052cc6f38 /migration/postcopy-ram.c | |
| parent | c39deb218178d1fb814dd2138ceff4b541a03d85 (diff) | |
| parent | f78d4ed701454f10079461b981ba2a61a95762ab (diff) | |
| download | focaccia-qemu-63ed851de474b1e2458cb9b4ba6e02a88f72c25c.tar.gz focaccia-qemu-63ed851de474b1e2458cb9b4ba6e02a88f72c25c.zip | |
Merge remote-tracking branch 'remotes/juanquintela/tags/migration-20211106-pull-request' into staging
Migration Pull request - fix vhost-user crash when using postcopy (me) - fix incorrect tag for docs (hyman) Please apply, Juan. # gpg: Signature made Sat 06 Nov 2021 07:29:37 PM EDT # gpg: using RSA key 1899FF8EDEBF58CCEE034B82F487EF185872D723 # gpg: Good signature from "Juan Quintela <quintela@redhat.com>" [full] # gpg: aka "Juan Quintela <quintela@trasno.org>" [full] * remotes/juanquintela/tags/migration-20211106-pull-request: docs: fix qemu incorrect tag migration: Check that postcopy fd's are not NULL Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Diffstat (limited to 'migration/postcopy-ram.c')
| -rw-r--r-- | migration/postcopy-ram.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/migration/postcopy-ram.c b/migration/postcopy-ram.c index e721f69d0f..d18b5d05b2 100644 --- a/migration/postcopy-ram.c +++ b/migration/postcopy-ram.c @@ -1457,6 +1457,10 @@ void postcopy_unregister_shared_ufd(struct PostCopyFD *pcfd) MigrationIncomingState *mis = migration_incoming_get_current(); GArray *pcrfds = mis->postcopy_remote_fds; + if (!pcrfds) { + /* migration has already finished and freed the array */ + return; + } for (i = 0; i < pcrfds->len; i++) { struct PostCopyFD *cur = &g_array_index(pcrfds, struct PostCopyFD, i); if (cur->fd == pcfd->fd) { |