diff options
author | Dan Carpenter <dan.carpenter@oracle.com> | 2022-10-25 17:32:49 +0200 |
---|---|---|
committer | Dave Hansen <dave.hansen@linux.intel.com> | 2022-10-25 21:27:08 +0200 |
commit | ae25e00ba84073450c07d8ffd2d74f914a027230 (patch) | |
tree | 502ef4e62370f53c31153950d488a17475ee11bc /arch/x86/kernel | |
parent | Merge branch 'x86/urgent' into x86/core, to resolve conflict (diff) | |
download | linux-ae25e00ba84073450c07d8ffd2d74f914a027230.tar.xz linux-ae25e00ba84073450c07d8ffd2d74f914a027230.zip |
x86/retpoline: Fix crash printing warning
The first argument of WARN() is a condition, so this will use "addr"
as the format string and possibly crash.
Fixes: 3b6c1747da48 ("x86/retpoline: Add SKL retthunk retpolines")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Dave Hansen <dave.hansen@linux.intel.com>
Link: https://lore.kernel.org/all/Y1gBoUZrRK5N%2FlCB@kili/
Diffstat (limited to 'arch/x86/kernel')
-rw-r--r-- | arch/x86/kernel/alternative.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/x86/kernel/alternative.c b/arch/x86/kernel/alternative.c index 19221d77dc27..b4ac4e58c010 100644 --- a/arch/x86/kernel/alternative.c +++ b/arch/x86/kernel/alternative.c @@ -418,7 +418,7 @@ clang_jcc: break; default: - WARN("%pS %px %*ph\n", addr, addr, 6, addr); + WARN(1, "%pS %px %*ph\n", addr, addr, 6, addr); return -1; } |