mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-20 01:20:54 +00:00
objtool: Fix error handling for STD/CLD warnings
[ Upstream commit6f567c9300
] Actually return an error (and display a backtrace, if requested) for directional bit warnings. Fixes:2f0f9e9ad7
("objtool: Add Direction Flag validation") Signed-off-by: Josh Poimboeuf <jpoimboe@redhat.com> Link: https://lore.kernel.org/r/dc70f2adbc72f09526f7cab5b6feb8bf7f6c5ad4.1611263461.git.jpoimboe@redhat.com Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
994334fa2a
commit
9e06f36658
1 changed files with 6 additions and 2 deletions
|
@ -2592,15 +2592,19 @@ static int validate_branch(struct objtool_file *file, struct symbol *func,
|
|||
break;
|
||||
|
||||
case INSN_STD:
|
||||
if (state.df)
|
||||
if (state.df) {
|
||||
WARN_FUNC("recursive STD", sec, insn->offset);
|
||||
return 1;
|
||||
}
|
||||
|
||||
state.df = true;
|
||||
break;
|
||||
|
||||
case INSN_CLD:
|
||||
if (!state.df && func)
|
||||
if (!state.df && func) {
|
||||
WARN_FUNC("redundant CLD", sec, insn->offset);
|
||||
return 1;
|
||||
}
|
||||
|
||||
state.df = false;
|
||||
break;
|
||||
|
|
Loading…
Reference in a new issue