summaryrefslogtreecommitdiff
path: root/arch/x86/kernel/alternative.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2024-05-19 21:42:29 +0300
committerLinus Torvalds <torvalds@linux-foundation.org>2024-05-19 21:42:29 +0300
commit41c14f1ac82cdb1e009d635ffd5ae5dc4cc3f036 (patch)
tree6fd083382a8e5b3553a695b7927d1fa7940efa17 /arch/x86/kernel/alternative.c
parent8dde191aabba42e9c16c8d9c853a72a062db27ee (diff)
parent9dba9c67e52dbe0978c0e86c994891eba480adf0 (diff)
downloadlinux-41c14f1ac82cdb1e009d635ffd5ae5dc4cc3f036.tar.xz
Merge tag 'x86-urgent-2024-05-18' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull x86 fixes from Ingo Molnar: - Fix a NOP-patching bug that resulted in valid but suboptimal NOP sequences in certain cases - Fix build warnings related to fall-through control flow * tag 'x86-urgent-2024-05-18' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/alternatives: Use the correct length when optimizing NOPs x86/boot: Address clang -Wimplicit-fallthrough in vsprintf() x86/boot: Add a fallthrough annotation
Diffstat (limited to 'arch/x86/kernel/alternative.c')
-rw-r--r--arch/x86/kernel/alternative.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/x86/kernel/alternative.c b/arch/x86/kernel/alternative.c
index 7555c15b7183..89de61243272 100644
--- a/arch/x86/kernel/alternative.c
+++ b/arch/x86/kernel/alternative.c
@@ -372,7 +372,7 @@ static void __apply_relocation(u8 *buf, const u8 * const instr, size_t instrlen,
void apply_relocation(u8 *buf, const u8 * const instr, size_t instrlen, u8 *repl, size_t repl_len)
{
__apply_relocation(buf, instr, instrlen, repl, repl_len);
- optimize_nops(instr, buf, repl_len);
+ optimize_nops(instr, buf, instrlen);
}
/* Low-level backend functions usable from alternative code replacements. */