aboutsummaryrefslogtreecommitdiff
path: root/tools/perf/util/scripting-engines/trace-event-python.c
diff options
context:
space:
mode:
authorArd Biesheuvel <[email protected]>2018-03-12 08:44:59 +0000
committerIngo Molnar <[email protected]>2018-03-12 10:05:01 +0100
commit136d5d57e35cc6985c57d23d0c823133e3508bed (patch)
tree9861b6a4c9c7abfbe836114493fc3551f25f0268 /tools/perf/util/scripting-engines/trace-event-python.c
parent7e904a91bf6049071ef9d605a52f863ae774081d (diff)
efi/esrt: Fix handling of early ESRT table mapping
As reported by Tyler, efi_esrt_init() will return without releasing the ESRT table header mapping if it encounters a table with an unexpected version. Replacing the 'return' with 'goto err_memunmap' would fix this particular occurrence, but, as it turns out, the code is rather peculiar to begin with: - it never uses the header mapping after memcpy()'ing out its contents, - it maps and unmaps the entire table without ever looking at the contents. So let's refactor this code to unmap the table header right after the memcpy() so we can get rid of the error handling path altogether, and drop the second mapping entirely. Reported-by: Tyler Baicar <[email protected]> Signed-off-by: Ard Biesheuvel <[email protected]> Cc: Linus Torvalds <[email protected]> Cc: Matt Fleming <[email protected]> Cc: Peter Jones <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: Thomas Gleixner <[email protected]> Cc: [email protected] Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Ingo Molnar <[email protected]>
Diffstat (limited to 'tools/perf/util/scripting-engines/trace-event-python.c')
0 files changed, 0 insertions, 0 deletions