>>> Yi Sun <yi.y....@linux.intel.com> 08/04/17 11:45 AM >>>
>--- a/xen/arch/x86/psr.c
>+++ b/xen/arch/x86/psr.c
>@@ -1294,9 +1294,7 @@ static void psr_free_cos(struct domain *d)
>{
>unsigned int socket, cos;
 >
>- ASSERT(socket_info);
>-
>-    if ( !d->arch.psr_cos_ids )
>+    if ( !d->arch.psr_cos_ids || !psr_alloc_feat_enabled() )
>return;
 
Isn't it rather that you want to move the ASSERT() past this check? I don't see
why you need both checks, as d->arch.psr_cos_ids is only being allocated if
psr_alloc_feat_enabled() returns true.

Jan


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel

Reply via email to