aboutsummaryrefslogtreecommitdiff
path: root/migration/migration.h
diff options
context:
space:
mode:
authorMarkus Armbruster <armbru@redhat.com>2021-02-02 15:17:31 +0100
committerDr. David Alan Gilbert <dgilbert@redhat.com>2021-02-08 11:19:51 +0000
commitec17de0ac09f1f45c78d6afd0d7aea05ffb0ed9d (patch)
tree8a0fd46ddadc915a70817b057be40c583df35f8a /migration/migration.h
parentc7243566d0b58966e41fd2b56145f885a04793ec (diff)
migration: Fix migrate-set-parameters argument validation
Commit 741d4086c8 "migration: Use proper types in json" (v2.12.0) switched MigrationParameters to narrower integer types, and removed the simplified qmp_migrate_set_parameters()'s argument checking accordingly. Good idea, except qmp_migrate_set_parameters() takes MigrateSetParameters, not MigrationParameters. Its job is updating migrate_get_current()->parameters (which *is* of type MigrationParameters) according to its argument. The integers now get truncated silently. Reproducer: ---> {'execute': 'query-migrate-parameters'} <--- {"return": {[...] "compress-threads": 8, [...]}} ---> {"execute": "migrate-set-parameters", "arguments": {"compress-threads": 257}} <--- {"return": {}} ---> {'execute': 'query-migrate-parameters'} <--- {"return": {[...] "compress-threads": 1, [...]}} Fix by resynchronizing MigrateSetParameters with MigrationParameters. Fixes: 741d4086c856320807a2575389d7c0505578270b Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com> Message-Id: <20210202141734.2488076-2-armbru@redhat.com> Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Diffstat (limited to 'migration/migration.h')
0 files changed, 0 insertions, 0 deletions