struct stack_info *info);
static inline int unwind_next_common(struct unwind_state *state,
- struct stack_info *info,
on_accessible_stack_fn accessible,
stack_trace_translate_fp_fn translate_fp)
{
+ struct stack_info info;
unsigned long fp = state->fp, kern_fp = fp;
struct task_struct *tsk = state->task;
if (fp & 0x7)
return -EINVAL;
- if (!accessible(tsk, fp, 16, info))
+ if (!accessible(tsk, fp, 16, &info))
return -EINVAL;
- if (test_bit(info->type, state->stacks_done))
+ if (test_bit(info.type, state->stacks_done))
return -EINVAL;
/*
* If fp is not from the current address space perform the necessary
* translation before dereferencing it to get the next fp.
*/
- if (translate_fp && !translate_fp(&kern_fp, info->type))
+ if (translate_fp && !translate_fp(&kern_fp, info.type))
return -EINVAL;
/*
* stack to another, it's never valid to unwind back to that first
* stack.
*/
- if (info->type == state->prev_type) {
+ if (info.type == state->prev_type) {
if (fp <= state->prev_fp)
return -EINVAL;
} else {
state->fp = READ_ONCE(*(unsigned long *)(kern_fp));
state->pc = READ_ONCE(*(unsigned long *)(kern_fp + 8));
state->prev_fp = fp;
- state->prev_type = info->type;
+ state->prev_type = info.type;
return 0;
}
{
struct task_struct *tsk = state->task;
unsigned long fp = state->fp;
- struct stack_info info;
int err;
/* Final frame; nothing to unwind */
if (fp == (unsigned long)task_pt_regs(tsk)->stackframe)
return -ENOENT;
- err = unwind_next_common(state, &info, on_accessible_stack, NULL);
+ err = unwind_next_common(state, on_accessible_stack, NULL);
if (err)
return err;
static int unwind_next(struct unwind_state *state)
{
- struct stack_info info;
-
- return unwind_next_common(state, &info, on_accessible_stack, NULL);
+ return unwind_next_common(state, on_accessible_stack, NULL);
}
static void notrace unwind(struct unwind_state *state,
static int unwind_next(struct unwind_state *state)
{
- struct stack_info info;
-
- return unwind_next_common(state, &info, on_accessible_stack,
+ return unwind_next_common(state, on_accessible_stack,
kvm_nvhe_stack_kern_va);
}