On 09/03/18 16:01, Olaf Hering wrote:
> The value of num is always the same as domctl->u.getpageframeinfo3.num,
> it was assigned just a few lines before.
>
> Signed-off-by: Olaf Hering <o...@aepfle.de>

This isn't dead code.  It is a truncation check.

~Andrew

> ---
>  xen/arch/x86/domctl.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/xen/arch/x86/domctl.c b/xen/arch/x86/domctl.c
> index 8fbbf3aeb3..46d288a490 100644
> --- a/xen/arch/x86/domctl.c
> +++ b/xen/arch/x86/domctl.c
> @@ -421,8 +421,7 @@ long arch_do_domctl(
>          /* Games to allow this code block to handle a compat guest. */
>          void __user *guest_handle = domctl->u.getpageframeinfo3.array.p;
>  
> -        if ( unlikely(num > 1024) ||
> -             unlikely(num != domctl->u.getpageframeinfo3.num) )
> +        if ( unlikely(num > 1024) )
>          {
>              ret = -E2BIG;
>              break;


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

Reply via email to