]> Pileus Git - ~andy/linux/blobdiff - kernel/sched.c
Merge branch 'linus' into stackprotector
[~andy/linux] / kernel / sched.c
index 6f230596bd0c1d21a2c68ffbff8207e93dcd65b5..d897a524e7d8e5e88a96d1ab6b52f1e20d89fed3 100644 (file)
@@ -5790,12 +5790,7 @@ void sched_show_task(struct task_struct *p)
                printk(KERN_CONT " %016lx ", thread_saved_pc(p));
 #endif
 #ifdef CONFIG_DEBUG_STACK_USAGE
-       {
-               unsigned long *n = end_of_stack(p);
-               while (!*n)
-                       n++;
-               free = (unsigned long)n - (unsigned long)end_of_stack(p);
-       }
+       free = stack_not_used(p);
 #endif
        printk(KERN_CONT "%5lu %5d %6d\n", free,
                task_pid_nr(p), task_pid_nr(p->real_parent));