Commit 03c472e7 authored by Heiko Carstens's avatar Heiko Carstens Committed by sanglipeng
Browse files

KVM: s390: interrupt: use READ_ONCE() before cmpxchg()

stable inclusion
from stable-v5.10.166
commit 71bd134c4e9e2a12f4e210badb0b253dfee3712d
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I87FRA

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=71bd134c4e9e2a12f4e210badb0b253dfee3712d



--------------------------------

[ Upstream commit 42400d99 ]

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: default avatarChristian Borntraeger <borntraeger@linux.ibm.com>
Acked-by: default avatarChristian Borntraeger <borntraeger@linux.ibm.com>
Reviewed-by: default avatarClaudio Imbrenda <imbrenda@linux.ibm.com>
Link: https://lore.kernel.org/r/20230109145456.2895385-1-hca@linux.ibm.com


Signed-off-by: default avatarHeiko Carstens <hca@linux.ibm.com>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
Signed-off-by: default avatarsanglipeng <sanglipeng1@jd.com>
parent 7ac2a20f
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment