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

Re: [PATCH v2 1/2] x86: Check return values from early_memremap calls



On 10.11.22 16:45, Ross Philipson wrote:
There are a number of places where early_memremap is called
but the return pointer is not checked for NULL. The call
can result in a NULL being returned so the checks must
be added.

Note that the maintainers for both the Jailhouse and Xen code
approved of using panic() to handle allocation failures.

In addition to checking the return values, a bit of extra
cleanup of pr_* usages was done since the pr_fmt macro was
introduced in the modules touched by this patch.

Signed-off-by: Ross Philipson <ross.philipson@xxxxxxxxxx>
---
  arch/x86/kernel/devicetree.c | 13 +++++++++++
  arch/x86/kernel/e820.c       | 12 +++++++++--
  arch/x86/kernel/jailhouse.c  |  6 ++++++
  arch/x86/kernel/mpparse.c    | 51 +++++++++++++++++++++++++++++++++-----------
  arch/x86/kernel/setup.c      | 19 ++++++++++++++---
  arch/x86/xen/enlighten_hvm.c |  2 ++
  arch/x86/xen/mmu_pv.c        |  8 +++++++
  arch/x86/xen/setup.c         |  2 ++
  8 files changed, 95 insertions(+), 18 deletions(-)

For the Xen parts:

Reviewed-by: Juergen Gross <jgross@xxxxxxxx>


Juergen

Attachment: OpenPGP_0xB0DE9DD628BF132F.asc
Description: OpenPGP public key

Attachment: OpenPGP_signature
Description: OpenPGP digital signature


 


Rackspace

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