Re: [PATCH 2/3] stacktrace: add save_stack_trace_tsk_safe()

Andrew Morton
2015-02-18T00:13:22Z

On Mon, 16 Feb 2015 12:52:35 -0600 Josh Poimboeuf <jpoimboe@redhat.com> wrote:

> It isn't possible to get the stack of a running task (other than
> current) because we don't have the stack pointer and the stack can be
> inconsistent anyway. Add a safe stack saving facility which only saves
> the stack of the task if it's sleeping or if it's the current task.

Can you send the task an IPI and get it to save its stack for you?

There's probably some (messy, arch-dependent) way of trimming away the
interrupt-related stuff off the stack, if that's really needed.