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/I7TH9O 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: NChristian Borntraeger <borntraeger@linux.ibm.com> Acked-by: NChristian Borntraeger <borntraeger@linux.ibm.com> Reviewed-by: NClaudio Imbrenda <imbrenda@linux.ibm.com> Link: https://lore.kernel.org/r/20230109145456.2895385-1-hca@linux.ibm.comSigned-off-by: NHeiko Carstens <hca@linux.ibm.com> Signed-off-by: NSasha Levin <sashal@kernel.org> Signed-off-by: Nsanglipeng <sanglipeng1@jd.com>
Showing
想要评论请 注册 或 登录