Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=c64ac9f0581a80b6200846e7007a33c3b24ef745
Commit:     c64ac9f0581a80b6200846e7007a33c3b24ef745
Parent:     1f25756a11d662a986553754bf398ccc38f3925e
Author:     David McCullough <[EMAIL PROTECTED]>
AuthorDate: Thu Jul 26 17:46:07 2007 +0900
Committer:  Paul Mundt <[EMAIL PROTECTED]>
CommitDate: Thu Jul 26 17:46:07 2007 +0900

    sh: fix get_wchan() for SH kernels without framepointers
    
    Do not follow the frame pointers (/proc/X/task/1/stat) unless we were
    compiled with them.
    
    Signed-off-by: David McCullough <[EMAIL PROTECTED]>
    Signed-off-by: Paul Mundt <[EMAIL PROTECTED]>
---
 arch/sh/kernel/process.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/arch/sh/kernel/process.c b/arch/sh/kernel/process.c
index 6334a4c..3a17830 100644
--- a/arch/sh/kernel/process.c
+++ b/arch/sh/kernel/process.c
@@ -474,7 +474,6 @@ out:
 
 unsigned long get_wchan(struct task_struct *p)
 {
-       unsigned long schedule_frame;
        unsigned long pc;
 
        if (!p || p == current || p->state == TASK_RUNNING)
@@ -484,10 +483,13 @@ unsigned long get_wchan(struct task_struct *p)
         * The same comment as on the Alpha applies here, too ...
         */
        pc = thread_saved_pc(p);
+
+#ifdef CONFIG_FRAME_POINTER
        if (in_sched_functions(pc)) {
-               schedule_frame = (unsigned long)p->thread.sp;
+               unsigned long schedule_frame = (unsigned long)p->thread.sp;
                return ((unsigned long *)schedule_frame)[21];
        }
+#endif
 
        return pc;
 }
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to