From: Mahesh Jagannath Salgaonkar <mahesh@linux.vnet.ibm.com>
To: Santosh Sivaraj <santosh@fossix.org>,
linuxppc-dev <linuxppc-dev@lists.ozlabs.org>,
Linux Kernel <linux-kernel@vger.kernel.org>
Cc: "Aneesh Kumar K.V" <aneesh.kumar@linux.ibm.com>,
Mahesh Salgaonkar <mahesh@linux.ibm.com>,
Nicholas Piggin <npiggin@gmail.com>,
Chandan Rajendra <chandan@linux.vnet.ibm.com>,
stable@vger.kernel.org, Reza Arbab <arbab@linux.ibm.com>
Subject: Re: [PATCH v9 1/7] powerpc/mce: Schedule work from irq_work
Date: Tue, 13 Aug 2019 10:16:21 +0530 [thread overview]
Message-ID: <80d055bb-945c-e43d-05bb-6c33ec2f0c6f@linux.vnet.ibm.com> (raw)
In-Reply-To: <20190812092236.16648-2-santosh@fossix.org>
On 8/12/19 2:52 PM, Santosh Sivaraj wrote:
> schedule_work() cannot be called from MCE exception context as MCE can
> interrupt even in interrupt disabled context.
>
> fixes: 733e4a4c ("powerpc/mce: hookup memory_failure for UE errors")
> Suggested-by: Mahesh Salgaonkar <mahesh@linux.vnet.ibm.com>
> Signed-off-by: Santosh Sivaraj <santosh@fossix.org>
> Cc: stable@vger.kernel.org # v4.15+
> ---
> arch/powerpc/kernel/mce.c | 11 ++++++++++-
> 1 file changed, 10 insertions(+), 1 deletion(-)
Reviewed-by: Mahesh Salgaonkar <mahesh@linux.vnet.ibm.com>
Thanks,
-Mahesh.
>
> diff --git a/arch/powerpc/kernel/mce.c b/arch/powerpc/kernel/mce.c
> index b18df633eae9..cff31d4a501f 100644
> --- a/arch/powerpc/kernel/mce.c
> +++ b/arch/powerpc/kernel/mce.c
> @@ -33,6 +33,7 @@ static DEFINE_PER_CPU(struct machine_check_event[MAX_MC_EVT],
> mce_ue_event_queue);
>
> static void machine_check_process_queued_event(struct irq_work *work);
> +static void machine_check_ue_irq_work(struct irq_work *work);
> void machine_check_ue_event(struct machine_check_event *evt);
> static void machine_process_ue_event(struct work_struct *work);
>
> @@ -40,6 +41,10 @@ static struct irq_work mce_event_process_work = {
> .func = machine_check_process_queued_event,
> };
>
> +static struct irq_work mce_ue_event_irq_work = {
> + .func = machine_check_ue_irq_work,
> +};
> +
> DECLARE_WORK(mce_ue_event_work, machine_process_ue_event);
>
> static void mce_set_error_info(struct machine_check_event *mce,
> @@ -199,6 +204,10 @@ void release_mce_event(void)
> get_mce_event(NULL, true);
> }
>
> +static void machine_check_ue_irq_work(struct irq_work *work)
> +{
> + schedule_work(&mce_ue_event_work);
> +}
>
> /*
> * Queue up the MCE event which then can be handled later.
> @@ -216,7 +225,7 @@ void machine_check_ue_event(struct machine_check_event *evt)
> memcpy(this_cpu_ptr(&mce_ue_event_queue[index]), evt, sizeof(*evt));
>
> /* Queue work to process this event later. */
> - schedule_work(&mce_ue_event_work);
> + irq_work_queue(&mce_ue_event_irq_work);
> }
>
> /*
>
next prev parent reply other threads:[~2019-08-13 4:48 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-08-12 9:22 [PATCH v9 0/7] powerpc: implement machine check safe memcpy Santosh Sivaraj
2019-08-12 9:22 ` [PATCH v9 1/7] powerpc/mce: Schedule work from irq_work Santosh Sivaraj
2019-08-13 4:46 ` Mahesh Jagannath Salgaonkar [this message]
2019-08-14 9:02 ` Balbir Singh
2019-08-12 9:22 ` [PATCH v9 2/7] powerpc/mce: Fix MCE handling for huge pages Santosh Sivaraj
2019-08-12 13:55 ` Sasha Levin
2019-08-13 0:40 ` Santosh Sivaraj
2019-08-12 9:22 ` [PATCH v9 3/7] powerpc/mce: Make machine_check_ue_event() static Santosh Sivaraj
2019-08-12 9:22 ` [PATCH v9 4/7] extable: Add function to search only kernel exception table Santosh Sivaraj
2019-08-14 9:22 ` Balbir Singh
2019-08-14 9:39 ` Santosh Sivaraj
2019-08-12 9:22 ` [PATCH v9 5/7] powerpc/memcpy: Add memcpy_mcsafe for pmem Santosh Sivaraj
2019-08-12 9:22 ` [PATCH v9 6/7] powerpc/mce: Handle UE event for memcpy_mcsafe Santosh Sivaraj
2019-08-14 8:11 ` Mahesh Jagannath Salgaonkar
2019-08-14 9:38 ` Balbir Singh
2019-08-15 0:15 ` Santosh Sivaraj
2019-08-12 9:22 ` [PATCH v9 7/7] powerpc: add machine check safe copy_to_user Santosh Sivaraj
2019-08-14 9:40 ` Balbir Singh
2019-08-15 0:07 ` Santosh Sivaraj
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=80d055bb-945c-e43d-05bb-6c33ec2f0c6f@linux.vnet.ibm.com \
--to=mahesh@linux.vnet.ibm.com \
--cc=aneesh.kumar@linux.ibm.com \
--cc=arbab@linux.ibm.com \
--cc=chandan@linux.vnet.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=mahesh@linux.ibm.com \
--cc=npiggin@gmail.com \
--cc=santosh@fossix.org \
--cc=stable@vger.kernel.org \
/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;
as well as URLs for NNTP newsgroup(s).