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. -George _______________________________________________ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel