Commit ae25e00b authored by Dan Carpenter's avatar Dan Carpenter Committed by Dave Hansen

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: 3b6c1747 ("x86/retpoline: Add SKL retthunk retpolines")
Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: default avatarDave Hansen <dave.hansen@linux.intel.com>
Link: https://lore.kernel.org/all/Y1gBoUZrRK5N%2FlCB@kili/
parent bd194611
......@@ -418,7 +418,7 @@ static int emit_call_track_retpoline(void *addr, struct insn *insn, int reg, u8
break;
default:
WARN("%pS %px %*ph\n", addr, addr, 6, addr);
WARN(1, "%pS %px %*ph\n", addr, addr, 6, addr);
return -1;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment