mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 10:41:38 -04:00
fault-inject: Simplify stacktrace retrieval
Replace the indirection through struct stack_trace with an invocation of the storage array based interface. Signed-off-by: Thomas Gleixner <[email protected]> Reviewed-by: Josh Poimboeuf <[email protected]> Cc: Andy Lutomirski <[email protected]> Cc: Akinobu Mita <[email protected]> Cc: Steven Rostedt <[email protected]> Cc: Alexander Potapenko <[email protected]> Cc: Alexey Dobriyan <[email protected]> Cc: Andrew Morton <[email protected]> Cc: Christoph Lameter <[email protected]> Cc: Pekka Enberg <[email protected]> Cc: [email protected] Cc: David Rientjes <[email protected]> Cc: Catalin Marinas <[email protected]> Cc: Dmitry Vyukov <[email protected]> Cc: Andrey Ryabinin <[email protected]> Cc: [email protected] Cc: Mike Rapoport <[email protected]> Cc: Christoph Hellwig <[email protected]> Cc: [email protected] Cc: Robin Murphy <[email protected]> Cc: Marek Szyprowski <[email protected]> Cc: Johannes Thumshirn <[email protected]> Cc: David Sterba <[email protected]> Cc: Chris Mason <[email protected]> Cc: Josef Bacik <[email protected]> Cc: [email protected] Cc: [email protected] Cc: Mike Snitzer <[email protected]> Cc: Alasdair Kergon <[email protected]> Cc: Daniel Vetter <[email protected]> Cc: [email protected] Cc: Joonas Lahtinen <[email protected]> Cc: Maarten Lankhorst <[email protected]> Cc: [email protected] Cc: David Airlie <[email protected]> Cc: Jani Nikula <[email protected]> Cc: Rodrigo Vivi <[email protected]> Cc: Tom Zanussi <[email protected]> Cc: Miroslav Benes <[email protected]> Cc: [email protected] Link: https://lkml.kernel.org/r/[email protected]
This commit is contained in:
parent
af52bf6b92
commit
30191250c2
1 changed files with 3 additions and 9 deletions
|
|
@ -65,22 +65,16 @@ static bool fail_task(struct fault_attr *attr, struct task_struct *task)
|
|||
|
||||
static bool fail_stacktrace(struct fault_attr *attr)
|
||||
{
|
||||
struct stack_trace trace;
|
||||
int depth = attr->stacktrace_depth;
|
||||
unsigned long entries[MAX_STACK_TRACE_DEPTH];
|
||||
int n;
|
||||
int n, nr_entries;
|
||||
bool found = (attr->require_start == 0 && attr->require_end == ULONG_MAX);
|
||||
|
||||
if (depth == 0)
|
||||
return found;
|
||||
|
||||
trace.nr_entries = 0;
|
||||
trace.entries = entries;
|
||||
trace.max_entries = depth;
|
||||
trace.skip = 1;
|
||||
|
||||
save_stack_trace(&trace);
|
||||
for (n = 0; n < trace.nr_entries; n++) {
|
||||
nr_entries = stack_trace_save(entries, depth, 1);
|
||||
for (n = 0; n < nr_entries; n++) {
|
||||
if (attr->reject_start <= entries[n] &&
|
||||
entries[n] < attr->reject_end)
|
||||
return false;
|
||||
|
|
|
|||
Loading…
Reference in a new issue