[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <174220839194.14745.12721604369366153670.tip-bot2@tip-bot2>
Date: Mon, 17 Mar 2025 10:46:31 -0000
From: "tip-bot2 for Josh Poimboeuf" <tip-bot2@...utronix.de>
To: linux-tip-commits@...r.kernel.org
Cc: Josh Poimboeuf <jpoimboe@...nel.org>,
"Peter Zijlstra (Intel)" <peterz@...radead.org>,
Brendan Jackman <jackmanb@...gle.com>, x86@...nel.org,
linux-kernel@...r.kernel.org
Subject:
[tip: objtool/core] objtool: Fix error handling inconsistencies in check()
The following commit has been merged into the objtool/core branch of tip:
Commit-ID: b745962cb97569aad026806bb0740663cf813147
Gitweb: https://git.kernel.org/tip/b745962cb97569aad026806bb0740663cf813147
Author: Josh Poimboeuf <jpoimboe@...nel.org>
AuthorDate: Fri, 14 Mar 2025 12:29:00 -07:00
Committer: Peter Zijlstra <peterz@...radead.org>
CommitterDate: Mon, 17 Mar 2025 11:35:59 +01:00
objtool: Fix error handling inconsistencies in check()
Make sure all fatal errors are funneled through the 'out' label with a
negative ret.
Signed-off-by: Josh Poimboeuf <jpoimboe@...nel.org>
Signed-off-by: Peter Zijlstra (Intel) <peterz@...radead.org>
Reviewed-by: Brendan Jackman <jackmanb@...gle.com>
Link: https://lore.kernel.org/r/0f49d6a27a080b4012e84e6df1e23097f44cc082.1741975349.git.jpoimboe@kernel.org
---
tools/objtool/check.c | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/tools/objtool/check.c b/tools/objtool/check.c
index 12bf6c1..e68a89e 100644
--- a/tools/objtool/check.c
+++ b/tools/objtool/check.c
@@ -4605,8 +4605,10 @@ int check(struct objtool_file *file)
init_cfi_state(&force_undefined_cfi);
force_undefined_cfi.force_undefined = true;
- if (!cfi_hash_alloc(1UL << (file->elf->symbol_bits - 3)))
+ if (!cfi_hash_alloc(1UL << (file->elf->symbol_bits - 3))) {
+ ret = -1;
goto out;
+ }
cfi_hash_add(&init_cfi);
cfi_hash_add(&func_cfi);
@@ -4623,7 +4625,7 @@ int check(struct objtool_file *file)
if (opts.retpoline) {
ret = validate_retpoline(file);
if (ret < 0)
- return ret;
+ goto out;
warnings += ret;
}
@@ -4659,7 +4661,7 @@ int check(struct objtool_file *file)
*/
ret = validate_unrets(file);
if (ret < 0)
- return ret;
+ goto out;
warnings += ret;
}
@@ -4722,7 +4724,7 @@ int check(struct objtool_file *file)
if (opts.prefix) {
ret = add_prefix_symbols(file);
if (ret < 0)
- return ret;
+ goto out;
warnings += ret;
}
Powered by blists - more mailing lists