]> git.baikalelectronics.ru Git - kernel.git/commit
fault_inject: Don't rely on "return value" from WRITE_ONCE()
authorWill Deacon <will@kernel.org>
Thu, 19 Dec 2019 17:40:21 +0000 (17:40 +0000)
committerWill Deacon <will@kernel.org>
Wed, 15 Apr 2020 20:36:41 +0000 (21:36 +0100)
commit92cace97c4b6c9e7af63f0cb38d8db2fc86c8c51
treeb33080e6d87ae7af66b5ad77987d6a4fa321b0fe
parent46b1cb0def96cc0b421e5ea2b098ff35c690d5a4
fault_inject: Don't rely on "return value" from WRITE_ONCE()

It's a bit weird that WRITE_ONCE() evaluates to the value it stores and
it's different to smp_store_release(), which can't be used this way.

In preparation for preventing this in WRITE_ONCE(), change the fault
injection code to use a local variable instead.

Cc: Akinobu Mita <akinobu.mita@gmail.com>
Signed-off-by: Will Deacon <will@kernel.org>
lib/fault-inject.c