]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commit
KVM: s390: interrupt: use READ_ONCE() before cmpxchg()
authorHeiko Carstens <hca@linux.ibm.com>
Mon, 9 Jan 2023 14:54:56 +0000 (15:54 +0100)
committerHeiko Carstens <hca@linux.ibm.com>
Wed, 11 Jan 2023 14:28:47 +0000 (15:28 +0100)
commit42400d99e9f0728c17240edb9645637ead40f6b9
treea31270d8eb3bfa5e7f7fce4895528c70af882389
parente3f360db08d55a14112bd27454e616a24296a8b0
KVM: s390: interrupt: use READ_ONCE() before cmpxchg()

Use READ_ONCE() before cmpxchg() to prevent that the compiler generates
code that fetches the to be compared old value several times from memory.

Reviewed-by: Christian Borntraeger <borntraeger@linux.ibm.com>
Acked-by: Christian Borntraeger <borntraeger@linux.ibm.com>
Reviewed-by: Claudio Imbrenda <imbrenda@linux.ibm.com>
Link: https://lore.kernel.org/r/20230109145456.2895385-1-hca@linux.ibm.com
Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
arch/s390/kvm/interrupt.c