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

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

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.


Xen-devel mailing list



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