Russell King d5996b2ff0 ARM: fix /proc/$PID/stack on SMP
Rabin Vincent reports:
| On SMP, this BUG() in save_stack_trace_tsk() can be easily triggered
| from user space by reading /proc/$PID/stack, where $PID is any pid but
| the current process:
|
|	if (tsk != current) {
| #ifdef CONFIG_SMP
|		/*
|		 * What guarantees do we have here that 'tsk'
|		 * is not running on another CPU?
|		 */
|		BUG();
| #else

Fix this by replacing the BUG() with an entry to terminate the stack
trace, returning an empty trace - I'd rather not expose the dwarf
unwinder to a volatile stack of a running thread.

Reported-by: Rabin Vincent <rabin@rab.in>
Tested-by: Rabin Vincent <rabin@rab.in>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2011-01-15 09:27:04 +00:00
..
2008-08-12 19:54:09 +01:00
2011-01-06 22:32:03 +00:00
2011-01-06 22:32:52 +00:00
2008-09-06 12:10:45 +01:00
2011-01-06 22:32:52 +00:00
2010-12-20 23:07:36 +08:00
2010-10-29 13:14:40 -05:00
2010-12-20 23:07:36 +08:00
2010-03-12 15:52:38 -08:00
2011-01-15 09:27:04 +00:00
2011-01-06 22:32:52 +00:00