[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH 03/28] libxc: move munmap into the loop it's needed in in change_pte



On Wed, 2013-09-18 at 15:37 +1200, Matthew Daley wrote:

I think the commit message is wrong here, it's not moving it inside a
loop, it's moving it inside a conditional.

It's already in the outer loop (over i) and putting it into the inner
loop (over j) would be wrong I think.


> Coverity-ID: 1055269
> Signed-off-by: Matthew Daley <mattjd@xxxxxxxxx>
> ---
>  tools/libxc/xc_offline_page.c |    6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/tools/libxc/xc_offline_page.c b/tools/libxc/xc_offline_page.c
> index fbb53f5..8195efb 100644
> --- a/tools/libxc/xc_offline_page.c
> +++ b/tools/libxc/xc_offline_page.c
> @@ -317,10 +317,10 @@ static int change_pte(xc_interface *xch, int domid,
>                      goto failed;
>                  }
>              }
> -        }
>  
> -        munmap(content, PAGE_SIZE);
> -        content = NULL;
> +            munmap(content, PAGE_SIZE);
> +            content = NULL;
> +        }
>      }
>  
>      if ( xc_flush_mmu_updates(xch, mmu) )



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


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.