On 23/01/2020 11:51, Jan Beulich wrote:
> The initial observation was that the mfn_valid() check comes too late:
> Neither mfn_add() nor mfn_to_page() (let alone de-referencing the
> result of the latter) are valid for MFNs failing this check. Move it up
> and - noticing that there's no caller doing so - also add an assertion
> that this should never produce "false" here.
>
> In turn this would have meant that the "else" to that if() could now go
> away, which didn't seem right at all. And indeed, considering callers
> like memory_exchange() or various grant table functions, the PoD
> accounting should have been outside of that if() from the very
> beginning.
>
> Signed-off-by: Jan Beulich <jbeul...@suse.com>

Acked-by: Andrew Cooper <andrew.coop...@citrix.com>

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

Reply via email to