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

Re: [Xen-devel] [Patch] hvm/vidirian: Avoid printing page_to_mfn(NULL) on error paths.

  • To: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Xen-devel <xen-devel@xxxxxxxxxxxxx>
  • From: Keir Fraser <keir.xen@xxxxxxxxx>
  • Date: Wed, 09 Oct 2013 06:26:32 +0100
  • Cc: Tim Deegan <tim@xxxxxxx>, Jan Beulich <JBeulich@xxxxxxxx>
  • Delivery-date: Wed, 09 Oct 2013 05:27:14 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xen.org>
  • Thread-index: Ac7EsBz94wprDIw8kkqwSm0vLOvCKA==
  • Thread-topic: [Xen-devel] [Patch] hvm/vidirian: Avoid printing page_to_mfn(NULL) on error paths.

On 08/10/2013 21:17, "Andrew Cooper" <andrew.cooper3@xxxxxxxxxx> wrote:

> While working in the viridian code, I noticed that 4cb6c4f4941
> "x86/hvm: Use get_page_from_gfn() instead of get_gfn()/put_gfn."
> introduced two error paths where page_to_mfn(NULL) would be formatted and
> presented as a bad MFN.  This provides junk in the warning rather than
> something useful.
> These two codepaths are fixed up to match their counterpart in
> wrmsr_hypervisor_regs()
> While auditing the other changes from 4cb6c4f4941, I noticed a small
> optimisation which could be made by changing the order of the validity checks
> to remove 6 NULL pointer checks.
> Signed-off-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
> CC: Keir Fraser <keir@xxxxxxx>
> CC: Jan Beulich <JBeulich@xxxxxxxx>
> CC: Tim Deegan <tim@xxxxxxx>

Acked-by: Keir Fraser <keir@xxxxxxx>

Xen-devel mailing list



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