>>> On 07.04.16 at 10:39, <rcojoc...@bitdefender.com> wrote:
> Theoretically it is possible for mem_access_emulate_each_rep to be
> true even when current->arch.vm_event == NULL, so add an extra
> check to hvmemul_virtual_to_linear().

Mind saying what those theoretical conditions are when this might
happen?

> --- a/xen/arch/x86/hvm/emulate.c
> +++ b/xen/arch/x86/hvm/emulate.c
> @@ -514,7 +514,7 @@ static int hvmemul_virtual_to_linear(
>       * vm_event being triggered for repeated writes to a whole page.
>       */
>      if ( unlikely(current->domain->arch.mem_access_emulate_each_rep) &&
> -         current->arch.vm_event->emulate_flags != 0 )
> +         current->arch.vm_event && current->arch.vm_event->emulate_flags != 
> 0 )

That's then the third instance of "current" here - this needs
latching into a local variable.

Jan


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

Reply via email to