* PATCH] s390: fix machine check handling
@ 2014-11-28 15:03 Sebastian Ott
2014-11-28 15:38 ` Christoph Lameter
2014-12-02 17:19 ` [PATCH percpu/for-3.18-fixes] s390: fix machine check regression caused by the conversion from __get_cpu_var() to this_cpu_ptr() Tejun Heo
0 siblings, 2 replies; 5+ messages in thread
From: Sebastian Ott @ 2014-11-28 15:03 UTC (permalink / raw)
To: Martin Schwidefsky
Cc: Tejun Heo, Heiko Carstens, Christoph Lameter, linux-kernel
Hi,
would it be possible to have this one for 3.18 (if not, please add
Cc: stable@vger.kernel.org # v3.18)
Regards,
Sebastian
>8-----
>From ca198a6ff5766f19645104b7f8d621774524c4b4 Mon Sep 17 00:00:00 2001
From: Sebastian Ott <sebott@linux.vnet.ibm.com>
Date: Fri, 28 Nov 2014 15:40:57 +0100
Subject: [PATCH] s390: fix machine check handling
Commit eb7e7d76 "s390: Replace __get_cpu_var uses" broke machine check
handling.
We copy machine check information from per-cpu to a stack variable for
local processing. Next we should zap the per-cpu variable, not the
stack variable.
Signed-off-by: Sebastian Ott <sebott@linux.vnet.ibm.com>
Reviewed-by: Heiko Carstens <heiko.carstens@de.ibm.com>
---
arch/s390/kernel/nmi.c | 8 ++------
1 file changed, 2 insertions(+), 6 deletions(-)
diff --git a/arch/s390/kernel/nmi.c b/arch/s390/kernel/nmi.c
index dd1c24c..3f51cf4 100644
--- a/arch/s390/kernel/nmi.c
+++ b/arch/s390/kernel/nmi.c
@@ -54,12 +54,8 @@ void s390_handle_mcck(void)
*/
local_irq_save(flags);
local_mcck_disable();
- /*
- * Ummm... Does this make sense at all? Copying the percpu struct
- * and then zapping it one statement later?
- */
- memcpy(&mcck, this_cpu_ptr(&cpu_mcck), sizeof(mcck));
- memset(&mcck, 0, sizeof(struct mcck_struct));
+ mcck = *this_cpu_ptr(&cpu_mcck);
+ memset(this_cpu_ptr(&cpu_mcck), 0, sizeof(mcck));
clear_cpu_flag(CIF_MCCK_PENDING);
local_mcck_enable();
local_irq_restore(flags);
--
1.8.4.2
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: PATCH] s390: fix machine check handling
2014-11-28 15:03 PATCH] s390: fix machine check handling Sebastian Ott
@ 2014-11-28 15:38 ` Christoph Lameter
2014-12-02 17:19 ` [PATCH percpu/for-3.18-fixes] s390: fix machine check regression caused by the conversion from __get_cpu_var() to this_cpu_ptr() Tejun Heo
1 sibling, 0 replies; 5+ messages in thread
From: Christoph Lameter @ 2014-11-28 15:38 UTC (permalink / raw)
To: Sebastian Ott; +Cc: Martin Schwidefsky, Tejun Heo, Heiko Carstens, linux-kernel
On Fri, 28 Nov 2014, Sebastian Ott wrote:
> would it be possible to have this one for 3.18 (if not, please add
> Cc: stable@vger.kernel.org # v3.18)
Here is my ack if it helps:
Acked-by: Christoph Lameter <cl@linux.com>
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH percpu/for-3.18-fixes] s390: fix machine check regression caused by the conversion from __get_cpu_var() to this_cpu_ptr()
2014-11-28 15:03 PATCH] s390: fix machine check handling Sebastian Ott
2014-11-28 15:38 ` Christoph Lameter
@ 2014-12-02 17:19 ` Tejun Heo
2014-12-02 17:32 ` Sebastian Ott
1 sibling, 1 reply; 5+ messages in thread
From: Tejun Heo @ 2014-12-02 17:19 UTC (permalink / raw)
To: Sebastian Ott
Cc: Martin Schwidefsky, Heiko Carstens, Christoph Lameter,
linux-kernel
>From 1bb43105791dae7e9d4d1b1047729b12c5d5c3be Mon Sep 17 00:00:00 2001
From: Sebastian Ott <sebott@linux.vnet.ibm.com>
Date: Fri, 28 Nov 2014 16:03:14 +0100
Commit eb7e7d766326 ("s390: Replace __get_cpu_var uses") broke machine
check handling.
We copy machine check information from per-cpu to a stack variable for
local processing. Next we should zap the per-cpu variable, not the
stack variable.
Signed-off-by: Sebastian Ott <sebott@linux.vnet.ibm.com>
Reviewed-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Acked-by: Christoph Lameter <cl@linux.com>
Fixes: eb7e7d766326 ("s390: Replace __get_cpu_var uses")
Signed-off-by: Tejun Heo <tj@kernel.org>
---
Sorry about the delay. Was on vacation.
Patch applied to percpu/for-3.18-fixes w/ minor updates to the patch
subject and description. Will push out to Linus soon.
Thanks.
arch/s390/kernel/nmi.c | 8 ++------
1 file changed, 2 insertions(+), 6 deletions(-)
diff --git a/arch/s390/kernel/nmi.c b/arch/s390/kernel/nmi.c
index dd1c24c..3f51cf4 100644
--- a/arch/s390/kernel/nmi.c
+++ b/arch/s390/kernel/nmi.c
@@ -54,12 +54,8 @@ void s390_handle_mcck(void)
*/
local_irq_save(flags);
local_mcck_disable();
- /*
- * Ummm... Does this make sense at all? Copying the percpu struct
- * and then zapping it one statement later?
- */
- memcpy(&mcck, this_cpu_ptr(&cpu_mcck), sizeof(mcck));
- memset(&mcck, 0, sizeof(struct mcck_struct));
+ mcck = *this_cpu_ptr(&cpu_mcck);
+ memset(this_cpu_ptr(&cpu_mcck), 0, sizeof(mcck));
clear_cpu_flag(CIF_MCCK_PENDING);
local_mcck_enable();
local_irq_restore(flags);
--
2.1.0
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH percpu/for-3.18-fixes] s390: fix machine check regression caused by the conversion from __get_cpu_var() to this_cpu_ptr()
2014-12-02 17:19 ` [PATCH percpu/for-3.18-fixes] s390: fix machine check regression caused by the conversion from __get_cpu_var() to this_cpu_ptr() Tejun Heo
@ 2014-12-02 17:32 ` Sebastian Ott
2014-12-02 17:44 ` Tejun Heo
0 siblings, 1 reply; 5+ messages in thread
From: Sebastian Ott @ 2014-12-02 17:32 UTC (permalink / raw)
To: Tejun Heo
Cc: Martin Schwidefsky, Heiko Carstens, Christoph Lameter,
linux-kernel
On Tue, 2 Dec 2014, Tejun Heo wrote:
> Sorry about the delay. Was on vacation.
>
> Patch applied to percpu/for-3.18-fixes w/ minor updates to the patch
> subject and description. Will push out to Linus soon.
>
I've seen that Martin took the patch and it's already in Linus' tree -
commit 2cb4a18262fd0108cb8abd875710c59d0aa66f1d
Regards,
Sebastian
> Thanks.
>
> arch/s390/kernel/nmi.c | 8 ++------
> 1 file changed, 2 insertions(+), 6 deletions(-)
>
> diff --git a/arch/s390/kernel/nmi.c b/arch/s390/kernel/nmi.c
> index dd1c24c..3f51cf4 100644
> --- a/arch/s390/kernel/nmi.c
> +++ b/arch/s390/kernel/nmi.c
> @@ -54,12 +54,8 @@ void s390_handle_mcck(void)
> */
> local_irq_save(flags);
> local_mcck_disable();
> - /*
> - * Ummm... Does this make sense at all? Copying the percpu struct
> - * and then zapping it one statement later?
> - */
> - memcpy(&mcck, this_cpu_ptr(&cpu_mcck), sizeof(mcck));
> - memset(&mcck, 0, sizeof(struct mcck_struct));
> + mcck = *this_cpu_ptr(&cpu_mcck);
> + memset(this_cpu_ptr(&cpu_mcck), 0, sizeof(mcck));
> clear_cpu_flag(CIF_MCCK_PENDING);
> local_mcck_enable();
> local_irq_restore(flags);
> --
> 2.1.0
>
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH percpu/for-3.18-fixes] s390: fix machine check regression caused by the conversion from __get_cpu_var() to this_cpu_ptr()
2014-12-02 17:32 ` Sebastian Ott
@ 2014-12-02 17:44 ` Tejun Heo
0 siblings, 0 replies; 5+ messages in thread
From: Tejun Heo @ 2014-12-02 17:44 UTC (permalink / raw)
To: Sebastian Ott
Cc: Martin Schwidefsky, Heiko Carstens, Christoph Lameter,
linux-kernel
On Tue, Dec 02, 2014 at 06:32:28PM +0100, Sebastian Ott wrote:
> On Tue, 2 Dec 2014, Tejun Heo wrote:
> > Sorry about the delay. Was on vacation.
> >
> > Patch applied to percpu/for-3.18-fixes w/ minor updates to the patch
> > subject and description. Will push out to Linus soon.
> >
>
> I've seen that Martin took the patch and it's already in Linus' tree -
> commit 2cb4a18262fd0108cb8abd875710c59d0aa66f1d
Ah, okay. Dropping from percpu/for-3.18-fixes then.
Thanks.
--
tejun
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2014-12-02 17:44 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-11-28 15:03 PATCH] s390: fix machine check handling Sebastian Ott
2014-11-28 15:38 ` Christoph Lameter
2014-12-02 17:19 ` [PATCH percpu/for-3.18-fixes] s390: fix machine check regression caused by the conversion from __get_cpu_var() to this_cpu_ptr() Tejun Heo
2014-12-02 17:32 ` Sebastian Ott
2014-12-02 17:44 ` Tejun Heo
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox