Commit 2cb4a18262fd0108cb8abd875710c59d0aa66f1d

Authored by Sebastian Ott
Committed by Martin Schwidefsky
1 parent 009d0431c3

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>
Acked-by: Christoph Lameter <cl@linux.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>

Showing 1 changed file with 2 additions and 6 deletions Side-by-side Diff

arch/s390/kernel/nmi.c
... ... @@ -54,12 +54,8 @@
54 54 */
55 55 local_irq_save(flags);
56 56 local_mcck_disable();
57   - /*
58   - * Ummm... Does this make sense at all? Copying the percpu struct
59   - * and then zapping it one statement later?
60   - */
61   - memcpy(&mcck, this_cpu_ptr(&cpu_mcck), sizeof(mcck));
62   - memset(&mcck, 0, sizeof(struct mcck_struct));
  57 + mcck = *this_cpu_ptr(&cpu_mcck);
  58 + memset(this_cpu_ptr(&cpu_mcck), 0, sizeof(mcck));
63 59 clear_cpu_flag(CIF_MCCK_PENDING);
64 60 local_mcck_enable();
65 61 local_irq_restore(flags);