public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Guoheyi" <guoheyi@huawei.com>
To: <devel@edk2.groups.io>
Subject: Re: [edk2-devel] [PATCH] acpi/iort: check output reference for the real used mapping
Date: Tue, 25 Feb 2020 17:13:02 +0800	[thread overview]
Message-ID: <d9ed0d87-f9c5-fb3e-97b3-21dd04840244@huawei.com> (raw)
In-Reply-To: <15F699D2B1B4D3AE.21025@groups.io>

Hi all,

Please ignore it. I made a mistake of sending to the wrong mailing list...

Sorry for the noise.

And have a good day :)

Heyi

On 2020/2/25 17:01, Guoheyi wrote:
> The function iort_node_map_id() does the sanity check against the
> first mapping in the node, but not the one which we really use.
>
> Logically we need check the mapping we use, or check every mapping in
> the node. Choose the first fix for we are not firmware tester.
>
> Signed-off-by: Heyi Guo <guoheyi@huawei.com>
>
> ---
> Cc: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
> Cc: Hanjun Guo <guohanjun@huawei.com>
> Cc: Sudeep Holla <sudeep.holla@arm.com>
> Cc: "Rafael J. Wysocki" <rjw@rjwysocki.net>
> Cc: Len Brown <lenb@kernel.org>
> Cc: linux-acpi@vger.kernel.org
> Cc: linux-arm-kernel@lists.infradead.org
> Cc: linux-kernel@vger.kernel.org
> ---
>   drivers/acpi/arm64/iort.c | 14 +++++++-------
>   1 file changed, 7 insertions(+), 7 deletions(-)
>
> diff --git a/drivers/acpi/arm64/iort.c b/drivers/acpi/arm64/iort.c
> index ed3d2d1a7ae9..d0fe8d673240 100644
> --- a/drivers/acpi/arm64/iort.c
> +++ b/drivers/acpi/arm64/iort.c
> @@ -470,13 +470,6 @@ static struct acpi_iort_node *iort_node_map_id(struct acpi_iort_node *node,
>   		map = ACPI_ADD_PTR(struct acpi_iort_id_mapping, node,
>   				   node->mapping_offset);
>   
> -		/* Firmware bug! */
> -		if (!map->output_reference) {
> -			pr_err(FW_BUG "[node %p type %d] ID map has NULL parent reference\n",
> -			       node, node->type);
> -			goto fail_map;
> -		}
> -
>   		/*
>   		 * Get the special ID mapping index (if any) and skip its
>   		 * associated ID map to prevent erroneous multi-stage
> @@ -497,6 +490,13 @@ static struct acpi_iort_node *iort_node_map_id(struct acpi_iort_node *node,
>   		if (i == node->mapping_count)
>   			goto fail_map;
>   
> +		/* Firmware bug! */
> +		if (!map->output_reference) {
> +			pr_err(FW_BUG "[node %p type %d] ID map has NULL parent reference\n",
> +			       node, node->type);
> +			goto fail_map;
> +		}
> +
>   		node = ACPI_ADD_PTR(struct acpi_iort_node, iort_table,
>   				    map->output_reference);
>   	}


           reply	other threads:[~2020-02-25  9:13 UTC|newest]

Thread overview: expand[flat|nested]  mbox.gz  Atom feed
 [parent not found: <15F699D2B1B4D3AE.21025@groups.io>]

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-list 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=d9ed0d87-f9c5-fb3e-97b3-21dd04840244@huawei.com \
    --to=devel@edk2.groups.io \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox