[<prev] [next>] [day] [month] [year] [list]
Message-ID: <166693936407.29415.9974572427874008565.tip-bot2@tip-bot2>
Date: Fri, 28 Oct 2022 06:42:44 -0000
From: "tip-bot2 for Dan Carpenter" <tip-bot2@...utronix.de>
To: linux-tip-commits@...r.kernel.org
Cc: Dan Carpenter <dan.carpenter@...cle.com>,
Dave Hansen <dave.hansen@...ux.intel.com>, x86@...nel.org,
linux-kernel@...r.kernel.org
Subject: [tip: x86/core] x86/retpoline: Fix crash printing warning
The following commit has been merged into the x86/core branch of tip:
Commit-ID: ae25e00ba84073450c07d8ffd2d74f914a027230
Gitweb: https://git.kernel.org/tip/ae25e00ba84073450c07d8ffd2d74f914a027230
Author: Dan Carpenter <dan.carpenter@...cle.com>
AuthorDate: Tue, 25 Oct 2022 18:32:49 +03:00
Committer: Dave Hansen <dave.hansen@...ux.intel.com>
CommitterDate: Tue, 25 Oct 2022 12:27:08 -07:00
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@...cle.com>
Signed-off-by: Dave Hansen <dave.hansen@...ux.intel.com>
Link: https://lore.kernel.org/all/Y1gBoUZrRK5N%2FlCB@kili/
---
arch/x86/kernel/alternative.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/x86/kernel/alternative.c b/arch/x86/kernel/alternative.c
index 19221d7..b4ac4e5 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;
}
Powered by blists - more mailing lists