projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
bd19461
)
x86/retpoline: Fix crash printing warning
author
Dan Carpenter
<dan.carpenter@oracle.com>
Tue, 25 Oct 2022 15:32:49 +0000
(18:32 +0300)
committer
Dave Hansen
<dave.hansen@linux.intel.com>
Tue, 25 Oct 2022 19:27:08 +0000
(12:27 -0700)
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/
arch/x86/kernel/alternative.c
patch
|
blob
|
history
diff --git
a/arch/x86/kernel/alternative.c
b/arch/x86/kernel/alternative.c
index 19221d77dc27578f056ca0827cacf60c09a45eb7..b4ac4e58c0106fbab3933582c085a1f4ba27da58 100644
(file)
--- 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;
}