All of lore.kernel.org
 help / color / mirror / Atom feed
From: James Morse <james.morse@arm.com>
To: Shiju Jose <shiju.jose@huawei.com>
Cc: "rjw@rjwysocki.net" <rjw@rjwysocki.net>,
	"lenb@kernel.org" <lenb@kernel.org>, "bp@suse.de" <bp@suse.de>,
	"mingo@kernel.org" <mingo@kernel.org>,
	"prarit@redhat.com" <prarit@redhat.com>,
	"tbaicar@codeaurora.org" <tbaicar@codeaurora.org>,
	"punit.agrawal@arm.com" <punit.agrawal@arm.com>,
	"linux-acpi@vger.kernel.org" <linux-acpi@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"fu.wei@linaro.org" <fu.wei@linaro.org>,
	"Guohanjun (Hanjun Guo)" <guohanjun@huawei.com>,
	Gabriele Paoloni <gabriele.paoloni@huawei.com>,
	John Garry <john.garry@huawei.com>,
	"xuwei (O)" <xuwei5@hisilicon.com>,
	"Zhengqiang (turing)" <zhengqiang10@huawei.com>
Subject: Re: [PATCH 1/1] acpi:apei:handle GSIV and GPIO notification types
Date: Thu, 16 Mar 2017 14:25:49 +0000	[thread overview]
Message-ID: <58CAA06D.7010900@arm.com> (raw)
In-Reply-To: <86258A5CC0A3704780874CF6004BA8A62DCB6D39@lhreml502-mbx>

On 13/03/17 13:16, Shiju Jose wrote:
> System Controller Interrupts are received by ACPI's error device,
> which in turn notifies the GHES code. The same is true of
> APEI's GSIV and GPIO notification types.
> Add support for GSIV and GPIO sharing the SCI
> register/unregister/notifier code.Rename the list and notifier
> to show this is no longer just SCI, but anything from the
> Hardware Error Device.

Reviewed-by: James Morse <james.morse@arm.com>


... what looks like an existing bug:

> diff --git a/drivers/acpi/apei/ghes.c b/drivers/acpi/apei/ghes.c
> index b192b42..fd39929 100644
> --- a/drivers/acpi/apei/ghes.c
> +++ b/drivers/acpi/apei/ghes.c
> @@ -1068,10 +1072,12 @@ static int ghes_remove(struct platform_device *ghes_dev)
>  		free_irq(ghes->irq, ghes);
>  		break;
>  	case ACPI_HEST_NOTIFY_SCI:
> +	case ACPI_HEST_NOTIFY_GSIV:
> +	case ACPI_HEST_NOTIFY_GPIO:
>  		mutex_lock(&ghes_list_mutex);

>  		list_del_rcu(&ghes->list);

Suspiciously, there is no synchronize_rcu() between this list_del_rcu() and the
kfree(ghes) at the bottom of the function. It looks like 81e88fdc432a lifted it
into the NOTIFY_NMI path. I will send a separate fix.


> -		if (list_empty(&ghes_sci))
> -			unregister_acpi_hed_notifier(&ghes_notifier_sci);
> +		if (list_empty(&ghes_hed))
> +			unregister_acpi_hed_notifier(&ghes_notifier_hed);
>  		mutex_unlock(&ghes_list_mutex);
>  		break;
>  	case ACPI_HEST_NOTIFY_NMI:
> 


Thanks,

James

  reply	other threads:[~2017-03-16 14:26 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-13 13:16 [PATCH 1/1] acpi:apei:handle GSIV and GPIO notification types Shiju Jose
2017-03-16 14:25 ` James Morse [this message]
2017-03-16 15:20   ` Shiju Jose

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=58CAA06D.7010900@arm.com \
    --to=james.morse@arm.com \
    --cc=bp@suse.de \
    --cc=fu.wei@linaro.org \
    --cc=gabriele.paoloni@huawei.com \
    --cc=guohanjun@huawei.com \
    --cc=john.garry@huawei.com \
    --cc=lenb@kernel.org \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=prarit@redhat.com \
    --cc=punit.agrawal@arm.com \
    --cc=rjw@rjwysocki.net \
    --cc=shiju.jose@huawei.com \
    --cc=tbaicar@codeaurora.org \
    --cc=xuwei5@hisilicon.com \
    --cc=zhengqiang10@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.