All of lore.kernel.org
 help / color / mirror / Atom feed
From: Matt Fleming <matt@codeblueprint.co.uk>
To: Mathieu Poirier <mathieu.poirier@linaro.org>
Cc: "devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
	sstabellini@kernel.org, ard.biesheuvel@linaro.org,
	Catalin Marinas <catalin.marinas@arm.com>,
	Will Deacon <will.deacon@arm.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	xen-devel@lists.xen.org, stefano@aporeto.com,
	julien.grall@arm.com, linux-efi@vger.kernel.org,
	shannon.zhao@linaro.org, Shannon Zhao <zhaoshenglong@huawei.com>,
	peter.huangpeng@huawei.com,
	"linux-arm-kernel@lists.infradead.org"
	<linux-arm-kernel@lists.infradead.org>
Subject: Re: [PATCH] Xen: EFI: Parse DT parameters for Xen specific UEFI
Date: Wed, 11 May 2016 13:29:48 +0100	[thread overview]
Message-ID: <20160511122948.GV2839__25636.0253006735$1462969919$gmane$org@codeblueprint.co.uk> (raw)
In-Reply-To: <CANLsYkxUyiUfdjm39SvhKSvmddPLFP3JFAeHpYuxgPyZfexw6w@mail.gmail.com>

On Fri, 06 May, at 09:52:42AM, Mathieu Poirier wrote:
> > +static int __init efi_remap_init(void)
> > +{
> > +       u64 mapsize;
> > +
> > +       pr_info("Remapping and enabling EFI services.\n");
> > +
> > +       mapsize = memmap.map_end - memmap.map;
> > +       memmap.map = (__force void *)ioremap_cache(memmap.phys_map,
> > +                                                  mapsize);
> > +       if (!memmap.map) {
> > +               pr_err("Failed to remap EFI memory map\n");
> > +               return -ENOMEM;
> > +       }
> > +       memmap.map_end = memmap.map + mapsize;
> > +       efi.memmap = &memmap;
> > +
> > +       efi.systab = (__force void *)ioremap_cache(efi_system_table,
> > +                                                  sizeof(efi_system_table_t));
> > +       if (!efi.systab) {
> 
> Is there a reason why memmap.map isn't iounmap() in the error path?
> The original code didn't have it either, hence the question.

I suspect that is a bug.

In reality, if you can't access the EFI System Table because you fail
to map it I would guess you are going to crash very, very quickly
anyhow.

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

  reply	other threads:[~2016-05-11 12:29 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-06  8:32 [PATCH] Xen: EFI: Parse DT parameters for Xen specific UEFI Shannon Zhao
2016-05-06  8:32 ` Shannon Zhao
2016-05-06  8:32 ` Shannon Zhao
2016-05-06 15:52 ` Mathieu Poirier
2016-05-06 15:52   ` Mathieu Poirier
2016-05-06 15:52   ` Mathieu Poirier
2016-05-11 12:29   ` Matt Fleming [this message]
2016-05-11 12:29   ` Matt Fleming
2016-05-11 12:29     ` Matt Fleming
2016-05-11 12:29     ` Matt Fleming
2016-05-06 15:52 ` Mathieu Poirier
2016-05-11 12:27 ` Matt Fleming
2016-05-11 12:27 ` Matt Fleming
2016-05-11 12:27   ` Matt Fleming
2016-05-11 12:27   ` Matt Fleming
2016-05-11 13:35   ` Shannon Zhao
2016-05-11 13:35   ` Shannon Zhao
2016-05-11 13:35     ` Shannon Zhao
2016-05-11 13:35     ` Shannon Zhao
2016-05-11 23:24     ` Matt Fleming
2016-05-11 23:24       ` Matt Fleming
2016-05-12  2:22       ` Shannon Zhao
2016-05-12  2:22         ` Shannon Zhao
2016-05-12  2:22         ` Shannon Zhao
2016-05-12 10:04         ` Matt Fleming
2016-05-12 10:04           ` Matt Fleming
2016-05-12 10:04           ` Matt Fleming
2016-05-12 10:58           ` Stefano Stabellini
2016-05-12 10:58             ` Stefano Stabellini
2016-05-12 10:58             ` Stefano Stabellini
2016-05-12 10:58           ` Stefano Stabellini
2016-05-12 10:04         ` Matt Fleming
2016-05-12  2:22       ` Shannon Zhao
2016-05-11 23:24     ` Matt Fleming
  -- strict thread matches above, loose matches on Subject: below --
2016-05-06  8:32 Shannon Zhao

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='20160511122948.GV2839__25636.0253006735$1462969919$gmane$org@codeblueprint.co.uk' \
    --to=matt@codeblueprint.co.uk \
    --cc=ard.biesheuvel@linaro.org \
    --cc=catalin.marinas@arm.com \
    --cc=devicetree@vger.kernel.org \
    --cc=julien.grall@arm.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-efi@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mathieu.poirier@linaro.org \
    --cc=peter.huangpeng@huawei.com \
    --cc=shannon.zhao@linaro.org \
    --cc=sstabellini@kernel.org \
    --cc=stefano@aporeto.com \
    --cc=will.deacon@arm.com \
    --cc=xen-devel@lists.xen.org \
    --cc=zhaoshenglong@huawei.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.