mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
sh: unwinder: Introduce UNWINDER_BUG() and UNWINDER_BUG_ON()
We can't assume that if we execute the unwinder code and the unwinder was already running that it has faulted. Clearly two kernel threads can invoke the unwinder at the same time and may be running simultaneously. The previous approach used BUG() and BUG_ON() in the unwinder code to detect whether the unwinder was incapable of unwinding the stack, and that the next available unwinder should be used instead. A better approach is to explicitly invoke a trap handler to switch unwinders when the current unwinder cannot continue. Signed-off-by: Matt Fleming <matt@console-pimps.org>
This commit is contained in:
parent
97efbbd588
commit
b344e24a8e
8 changed files with 96 additions and 27 deletions
|
@ -22,4 +22,10 @@ extern void stack_reader_dump(struct task_struct *, struct pt_regs *,
|
|||
unsigned long *, const struct stacktrace_ops *,
|
||||
void *);
|
||||
|
||||
/*
|
||||
* Used by fault handling code to signal to the unwinder code that it
|
||||
* should switch to a different unwinder.
|
||||
*/
|
||||
extern int unwinder_faulted;
|
||||
|
||||
#endif /* _LINUX_UNWINDER_H */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue