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

Re: [Xen-devel] [PATCH] xentrace: simplify map_page function in xenctx



On Thu, Mar 17, 2016 at 11:48:39AM +0000, George Dunlap wrote:
> On 03/03/16 13:10, Wei Liu wrote:
> > There were several problems:
> > 
> > 1. Variable mapped was set to NULL so the following two "if"s were
> >    useless.
> > 2. Variable previous_mfn was set but never used.
> 
> mapped and previous_mfn are static, which (in this context) means they
> persists across invocations of the function. mapped is only set to NULL
> for the first call. Subsequent calls it's used to unmap the previous
> mapping; and previous_mfn is used to avoid unmap'ing and re-map'ing the
> same mfn.
> 
> This change will cause xenctx to leak virtual address space.
> 

Right. I missed that static, sigh. Ignore this patch please.

Wei.

>  -George
> 

_______________________________________________
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®.