From: Sebastian Ott Date: Fri, 28 Nov 2014 14:40:57 +0000 (+0100) Subject: s390: fix machine check handling X-Git-Tag: firefly_0821_release~176^2~2803 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=2cb4a18262fd0108cb8abd875710c59d0aa66f1d;p=firefly-linux-kernel-4.4.55.git 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 Reviewed-by: Heiko Carstens Acked-by: Christoph Lameter Signed-off-by: Martin Schwidefsky --- diff --git a/arch/s390/kernel/nmi.c b/arch/s390/kernel/nmi.c index dd1c24ceda50..3f51cf4e8f02 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);