summaryrefslogtreecommitdiff
path: root/arch/x86/kernel/alternative.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/x86/kernel/alternative.c')
-rw-r--r--arch/x86/kernel/alternative.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/arch/x86/kernel/alternative.c b/arch/x86/kernel/alternative.c
index d1d92897ed6b..f8a6062f6ae3 100644
--- a/arch/x86/kernel/alternative.c
+++ b/arch/x86/kernel/alternative.c
@@ -538,7 +538,9 @@ static int patch_return(void *addr, struct insn *insn, u8 *bytes)
{
int i = 0;
- if (cpu_feature_enabled(X86_FEATURE_RETHUNK))
+ if (cpu_feature_enabled(X86_FEATURE_RETHUNK) ||
+ cpu_feature_enabled(X86_FEATURE_SRSO) ||
+ cpu_feature_enabled(X86_FEATURE_SRSO_ALIAS))
return -1;
bytes[i++] = RET_INSN_OPCODE;