[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [xen master] xen/nospec: Remove unreachable code
commit 52bde26c1c651983e396002e2b0aeb8ef414e2d7 Author: Andrew Cooper <andrew.cooper3@xxxxxxxxxx> AuthorDate: Wed Apr 10 20:08:03 2024 +0100 Commit: Andrew Cooper <andrew.cooper3@xxxxxxxxxx> CommitDate: Thu Apr 11 13:23:08 2024 +0100 xen/nospec: Remove unreachable code When CONFIG_SPECULATIVE_HARDEN_LOCK is active, this reads: static always_inline bool lock_evaluate_nospec(bool condition) { return arch_lock_evaluate_nospec(condition); return condition; } Insert an #else to take out the second return. Fixes: 7ef0084418e1 ("x86/spinlock: introduce support for blocking speculation into critical regions") Signed-off-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx> Reviewed-by: Luca Fancellu <luca.fancellu@xxxxxxx> Reviewed-by: Stefano Stabellini <sstabellini@xxxxxxxxxx> --- xen/include/xen/nospec.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/xen/include/xen/nospec.h b/xen/include/xen/nospec.h index 9fb15aa26a..828dbd4e0a 100644 --- a/xen/include/xen/nospec.h +++ b/xen/include/xen/nospec.h @@ -82,8 +82,9 @@ static always_inline bool lock_evaluate_nospec(bool condition) { #ifdef CONFIG_SPECULATIVE_HARDEN_LOCK return arch_lock_evaluate_nospec(condition); -#endif +#else return condition; +#endif } #endif /* XEN_NOSPEC_H */ -- generated by git-patchbot for /home/xen/git/xen.git#master
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |