]> git.baikalelectronics.ru Git - kernel.git/commit
s390: use WRITE_ONCE when re-allocating async stack
authorSven Schnelle <svens@linux.ibm.com>
Wed, 10 Feb 2021 12:39:19 +0000 (13:39 +0100)
committerVasily Gorbik <gor@linux.ibm.com>
Sat, 13 Feb 2021 16:17:53 +0000 (17:17 +0100)
commitc1749b72708e1b1f011e5b9fb4b078f060fd6457
treed69076d3eb1e09285a65f1f1454519b1b5bd8f96
parent8d611868f0929d7ba08918363e216bb6af1dc111
s390: use WRITE_ONCE when re-allocating async stack

The code does:

S390_lowcore.async_stack = new + STACK_INIT_OFFSET;

But the compiler is free to first assign one value and
add the other value later. If a IRQ would be coming in
between these two operations, it would run with an invalid
stack. Prevent this by using WRITE_ONCE.

Signed-off-by: Sven Schnelle <svens@linux.ibm.com>
Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
arch/s390/kernel/setup.c