lock_profile_register_struct() is called from common code, but the matching
deregister was previously only called from x86 code.
The practical upshot of this when using CONFIG_LOCK_PROFILE, destroyed domains
on ARM (and in particular, the freed page behind struct domain) remain on the
lockprofile linked list, which will become corrupt when the page is reused.
Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Acked-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Wei Liu <wei.liu2@citrix.com>
void free_domain_struct(struct domain *d)
{
- lock_profile_deregister_struct(LOCKPROF_TYPE_PERDOM, d);
free_xenheap_page(d);
}
free_cpumask_var(d->dirty_cpumask);
+ lock_profile_deregister_struct(LOCKPROF_TYPE_PERDOM, d);
+
free_domain_struct(d);
}