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

Re: [PATCH] x86/p2m: fix p2m_add_foreign error path


  • To: Roger Pau Monne <roger.pau@xxxxxxxxxx>, <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
  • Date: Mon, 4 Jan 2021 10:45:16 +0000
  • Authentication-results: esa2.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none
  • Cc: Jan Beulich <jbeulich@xxxxxxxx>, George Dunlap <george.dunlap@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>
  • Delivery-date: Mon, 04 Jan 2021 10:45:30 +0000
  • Ironport-sdr: 9fYeqaHGTZraoqaBBdUCpwARpX6MmrxhStVtULBWvlTLO1ievx/1iWvTZxzPf8c4lmtsP1eyXF 9eVaCPh4vFtw16DjTWVCcxHhdRa1ZIysHwysQVoiEZxBveRZ3RDR5OsVNftaYpUE7Z1LcB7H0X VgaaFNh7X7ZEArPpmViXx67HsZPCY49C4yuTYrJc+ZZy0flBhFLSV3iiHVFPdESgDdLmni2uQH jdFMq7nY8qLpGGZrnVaPArY5qwza1fZU7+f7B51jKKqxH7/15CyTA1o9fF5+K9qFQnKJghTL+f zzI=
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 04/01/2021 09:03, Roger Pau Monne wrote:
> One of the error paths in p2m_add_foreign could call put_page with a
> NULL page, thus triggering a fault.
>
> Split the checks into two different if statements, so the appropriate
> error path can be taken.
>
> Fixes: 173ae325026bd ('x86/p2m: tidy p2m_add_foreign() a little')
> Signed-off-by: Roger Pau Monné <roger.pau@xxxxxxxxxx>

Acked and committed.

~Andrew



 


Rackspace

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