|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen staging] xen/domain: Call lock_profile_deregister_struct() from common code
commit 10e042c43ecdc0d25c6fbcf5c4889dda5d226591
Author: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
AuthorDate: Mon Sep 3 12:10:48 2018 +0100
Commit: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
CommitDate: Tue Sep 4 13:25:44 2018 +0100
xen/domain: Call lock_profile_deregister_struct() from common code
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@xxxxxxxxxx>
Acked-by: Jan Beulich <jbeulich@xxxxxxxx>
Reviewed-by: Wei Liu <wei.liu2@xxxxxxxxxx>
---
xen/arch/x86/domain.c | 1 -
xen/common/domain.c | 2 ++
2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/xen/arch/x86/domain.c b/xen/arch/x86/domain.c
index 688f7fbc4e..cd1419e740 100644
--- a/xen/arch/x86/domain.c
+++ b/xen/arch/x86/domain.c
@@ -298,7 +298,6 @@ struct domain *alloc_domain_struct(void)
void free_domain_struct(struct domain *d)
{
- lock_profile_deregister_struct(LOCKPROF_TYPE_PERDOM, d);
free_xenheap_page(d);
}
diff --git a/xen/common/domain.c b/xen/common/domain.c
index b0988763a3..2fcb35b082 100644
--- a/xen/common/domain.c
+++ b/xen/common/domain.c
@@ -274,6 +274,8 @@ static void _domain_destroy(struct domain *d)
free_cpumask_var(d->dirty_cpumask);
+ lock_profile_deregister_struct(LOCKPROF_TYPE_PERDOM, d);
+
free_domain_struct(d);
}
--
generated by git-patchbot for /home/xen/git/xen.git#staging
_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/xen-changelog
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |