summaryrefslogtreecommitdiff
path: root/tools/objtool
diff options
context:
space:
mode:
authorIngo Molnar <mingo@kernel.org>2017-11-07 12:48:05 +0300
committerIngo Molnar <mingo@kernel.org>2017-11-07 12:48:05 +0300
commit783711f0d2458ca1bd716000e767c478cef27144 (patch)
tree0aebe2cfc09cbfa9a18e6a5e8d002489745f45a8 /tools/objtool
parent6a93bb7e4a7d6670677d5b0eb980936eb9cc5d2e (diff)
parente4880bc5dfb1f02b152e62a894b5c6f3e995b3cf (diff)
downloadlinux-783711f0d2458ca1bd716000e767c478cef27144.tar.xz
Merge branch 'linus' into core/objtool, to pick up dependent fixes
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'tools/objtool')
-rw-r--r--tools/objtool/Makefile1
-rw-r--r--tools/objtool/arch/x86/insn/gen-insn-attr-x86.awk1
-rw-r--r--tools/objtool/check.c9
3 files changed, 9 insertions, 2 deletions
diff --git a/tools/objtool/Makefile b/tools/objtool/Makefile
index 6976c73e60c4..424b1965d06f 100644
--- a/tools/objtool/Makefile
+++ b/tools/objtool/Makefile
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
include ../scripts/Makefile.include
include ../scripts/Makefile.arch
diff --git a/tools/objtool/arch/x86/insn/gen-insn-attr-x86.awk b/tools/objtool/arch/x86/insn/gen-insn-attr-x86.awk
index a3d2c62fd805..b02a36b2c14f 100644
--- a/tools/objtool/arch/x86/insn/gen-insn-attr-x86.awk
+++ b/tools/objtool/arch/x86/insn/gen-insn-attr-x86.awk
@@ -1,4 +1,5 @@
#!/bin/awk -f
+# SPDX-License-Identifier: GPL-2.0
# gen-insn-attr-x86.awk: Instruction attribute table generator
# Written by Masami Hiramatsu <mhiramat@redhat.com>
#
diff --git a/tools/objtool/check.c b/tools/objtool/check.c
index 83f370fa00c2..9b341584eb1b 100644
--- a/tools/objtool/check.c
+++ b/tools/objtool/check.c
@@ -267,12 +267,13 @@ static int decode_instructions(struct objtool_file *file)
&insn->immediate,
&insn->stack_op);
if (ret)
- return ret;
+ goto err;
if (!insn->type || insn->type > INSN_LAST) {
WARN_FUNC("invalid instruction type %d",
insn->sec, insn->offset, insn->type);
- return -1;
+ ret = -1;
+ goto err;
}
hash_add(file->insn_hash, &insn->hash, insn->offset);
@@ -296,6 +297,10 @@ static int decode_instructions(struct objtool_file *file)
}
return 0;
+
+err:
+ free(insn);
+ return ret;
}
/*