]> git.baikalelectronics.ru Git - kernel.git/commit
powerpc: Fix hard_irq_disable() with sanitizer
authorChristophe Leroy <christophe.leroy@csgroup.eu>
Tue, 23 Aug 2022 16:36:35 +0000 (18:36 +0200)
committerMichael Ellerman <mpe@ellerman.id.au>
Wed, 31 Aug 2022 13:05:27 +0000 (23:05 +1000)
commit98914520d30e8a34fcae6a6cb8a1ebb689796dfe
tree2a689053024501123213af60f0dbd674e7d3e8d4
parent5f0f20e52d8a36a1c9424f03ec5a87b083d89370
powerpc: Fix hard_irq_disable() with sanitizer

As reported by Zhouyi Zhou, WRITE_ONCE() is not atomic
as expected when KASAN or KCSAN are compiled in.

Fix it by re-implementing it using inline assembly.

Fixes: 9a0b0b08ea8c ("powerpc/irq: remove inline assembly in hard_irq_disable macro")
Reported-by: Zhouyi Zhou <zhouzhouyi@gmail.com>
Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/a8298991b3df049a54ee8e558838e34265812014.1661272586.git.christophe.leroy@csgroup.eu
arch/powerpc/include/asm/hw_irq.h