summaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorStefani Seibold <stefani@seibold.net>2009-11-17 23:06:23 +0100
committerLinus Torvalds <torvalds@linux-foundation.org>2009-11-18 02:40:33 +0100
commit9ebd4eba761b624a6a6c9189335adeddcb1fa0e0 (patch)
tree8b5b5fc3514df3edf8bf6436636bf813c1f51e8c /fs
parentmm: allow memory hotplug and hibernation in the same kernel (diff)
downloadlinux-9ebd4eba761b624a6a6c9189335adeddcb1fa0e0.tar.xz
linux-9ebd4eba761b624a6a6c9189335adeddcb1fa0e0.zip
procfs: fix /proc/<pid>/stat stack pointer for kernel threads
Fix a small issue for the stack pointer in /proc/<pid>/stat. In case of a kernel thread the value of the printed stack pointer should be 0. Signed-off-by: Stefani Seibold <stefani@seibold.net> Cc: Ingo Molnar <mingo@elte.hu> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to '')
-rw-r--r--fs/proc/array.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/proc/array.c b/fs/proc/array.c
index 07f77a7945c3..822c2d506518 100644
--- a/fs/proc/array.c
+++ b/fs/proc/array.c
@@ -571,7 +571,7 @@ static int do_task_stat(struct seq_file *m, struct pid_namespace *ns,
rsslim,
mm ? mm->start_code : 0,
mm ? mm->end_code : 0,
- (permitted) ? task->stack_start : 0,
+ (permitted && mm) ? task->stack_start : 0,
esp,
eip,
/* The signal information here is obsolete.