From: Russell King Date: Sat, 15 Jan 2011 09:27:04 +0000 (+0000) Subject: ARM: fix /proc/$PID/stack on SMP X-Git-Tag: v2.6.38-rc1~39^2~1 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d5996b2ff0e26cf7ed4c103084a2d6fc569e7216;p=pandora-kernel.git 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 Tested-by: Rabin Vincent Signed-off-by: Russell King --- Reading git-diff-tree failed