Commit 7f28dad3 authored by Vasily Gorbik's avatar Vasily Gorbik

s390: disable preemption when switching to nodat stack with CALL_ON_STACK

Make sure preemption is disabled when temporary switching to nodat
stack with CALL_ON_STACK helper, because nodat stack is per cpu.
Reviewed-by: default avatarHeiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: default avatarVasily Gorbik <gor@linux.ibm.com>
parent c2e06e15
...@@ -164,7 +164,9 @@ static bool kdump_csum_valid(struct kimage *image) ...@@ -164,7 +164,9 @@ static bool kdump_csum_valid(struct kimage *image)
#ifdef CONFIG_CRASH_DUMP #ifdef CONFIG_CRASH_DUMP
int rc; int rc;
preempt_disable();
rc = CALL_ON_STACK(do_start_kdump, S390_lowcore.nodat_stack, 1, image); rc = CALL_ON_STACK(do_start_kdump, S390_lowcore.nodat_stack, 1, image);
preempt_enable();
return rc == 0; return rc == 0;
#else #else
return false; return false;
......
...@@ -119,9 +119,15 @@ static unsigned long __no_sanitize_address _memcpy_real(unsigned long dest, ...@@ -119,9 +119,15 @@ static unsigned long __no_sanitize_address _memcpy_real(unsigned long dest,
*/ */
int memcpy_real(void *dest, void *src, size_t count) int memcpy_real(void *dest, void *src, size_t count)
{ {
if (S390_lowcore.nodat_stack != 0) int rc;
return CALL_ON_STACK(_memcpy_real, S390_lowcore.nodat_stack,
3, dest, src, count); if (S390_lowcore.nodat_stack != 0) {
preempt_disable();
rc = CALL_ON_STACK(_memcpy_real, S390_lowcore.nodat_stack, 3,
dest, src, count);
preempt_enable();
return rc;
}
/* /*
* This is a really early memcpy_real call, the stacks are * This is a really early memcpy_real call, the stacks are
* not set up yet. Just call _memcpy_real on the early boot * not set up yet. Just call _memcpy_real on the early boot
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment