On Monday, May 29, 2023 10:58 PM, Peter Xu wrote:
> >
> > #1 migrate_params_test_apply(params, &tmp);
> >
> > #2 if (!migrate_params_check(&tmp, errp)) {
> > /* Invalid parameter */
> > return;
> > }
> > #3 migrate_params_apply(params, errp);
> >
> > #2 tries to do params check using tmp, which is expected to be set up
> > by #1, but #1 didn't use "&tmp",
>
> #1 initialized "&tmp" with current parameters, here:
>
> *dest = migrate_get_current()->parameters;
>
> ?
Yes. Sorry, I had a misunderstanding of this one. All the has_* of
the current params has been initialized to true at the beginning.
(I once dumped tmp after migrate_params_test_apply, it were all 0,
which drove me to make the changes, but couldn't reproduce it now
- things appear to be correct without this patch)