Skip to content

Commit

Permalink
s390: fix machine check handling
Browse files Browse the repository at this point in the history
Commit eb7e7d7 "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>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
  • Loading branch information
Sebastian Ott authored and Martin Schwidefsky committed Dec 1, 2014
1 parent 009d043 commit 2cb4a18
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions arch/s390/kernel/nmi.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 2cb4a18

Please sign in to comment.