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: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> Signed-off-by:
Sasha Levin <sashal@kernel.org> Signed-off-by:
sanglipeng <sanglipeng1@jd.com>
Loading
Please sign in to comment