ARM: 6884/1: Fix infinite loop in ARM user perf_event backtrace code
ARM: 6884/1: Fix infinite loop in ARM user perf_event backtrace code

The ARM user backtrace code can get into an infinite loop if it
runs into an invalid stack frame which points back to itself.
This situation has been observed in practice.  Fix it by capping
the number of entries in the backtrace.  This is also what other
architectures do in their backtrace code.

Signed-off-by: Sonny Rao <d867fc987a366be56684d1145622524a3ba1efbf@chromium.org>
Acked-by: Jamie Iles <b4dde37aa2aac745c0e6c43447507eaeace3e59f@jamieiles.com>
Acked-by: Olof Johansson <8c69ee23f3f44f8162a64d579c1fa25c2f55298a@lixom.net>
Signed-off-by: Russell King <f6aa0246ff943bfa8602cdf60d40c481b38ed232@arm.linux.org.uk>

TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas