Skip to content

Commit

Permalink
procfs: fix /proc/<pid>/stat stack pointer for kernel threads
Browse files Browse the repository at this point in the history
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 <[email protected]>
Cc: Ingo Molnar <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
sstefani authored and torvalds committed Nov 18, 2009
1 parent 6ad696d commit 9ebd4eb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fs/proc/array.c
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 9ebd4eb

Please sign in to comment.