Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=cc650a7a9f5ebc3f9290a8e20e3f55b4f52f849e
Commit:     cc650a7a9f5ebc3f9290a8e20e3f55b4f52f849e
Parent:     376e210b71d7736775f43f32c5c7712f90aaf59a
Author:     Kyle McMartin <[EMAIL PROTECTED]>
AuthorDate: Wed May 30 02:36:00 2007 -0400
Committer:  Kyle McMartin <[EMAIL PROTECTED]>
CommitDate: Wed May 30 02:36:00 2007 -0400

    [PARISC] be more defensive in process.c::get_wchan
    
    While debugging, I noticed we don't check the task_struct arg passed to
    get_wchan, whereas everyone else does.
    
    Signed-off-by: Kyle McMartin <[EMAIL PROTECTED]>
---
 arch/parisc/kernel/process.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/arch/parisc/kernel/process.c b/arch/parisc/kernel/process.c
index 0dd3847..3556648 100644
--- a/arch/parisc/kernel/process.c
+++ b/arch/parisc/kernel/process.c
@@ -381,6 +381,10 @@ get_wchan(struct task_struct *p)
        struct unwind_frame_info info;
        unsigned long ip;
        int count = 0;
+
+       if (!p || p == current || p->state == TASK_RUNNING)
+               return 0;
+
        /*
         * These bracket the sleeping functions..
         */
-
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