arm64: perf: fix array out of bounds access in armpmu_map_hw_event()
authorWill Deacon <will.deacon@arm.com>
Tue, 20 Aug 2013 10:47:39 +0000 (11:47 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 29 Aug 2013 16:47:36 +0000 (09:47 -0700)
commit975a3cd4cc0dff06a635cb16b8fb25fd3ae88234
tree81276d59fd3d7aaf454cd7b8302f834400d17beb
parent805eea0bb13dfded98c2383139b64d0576838b65
arm64: perf: fix array out of bounds access in armpmu_map_hw_event()

commit 868f6fea8fa63f09acbfa93256d0d2abdcabff79 upstream.

This is a port of d9f966357b14 ("ARM: 7810/1: perf: Fix array out of
bounds access in armpmu_map_hw_event()") to arm64, which fixes an oops
in the arm64 perf backend found as a result of Vince's fuzzing tool.

Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/arm64/kernel/perf_event.c