public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@linux-foundation.org>
To: Jan Engelhardt <jengelh@medozas.de>
Cc: gorcunov@openvz.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] procfs: use more apprioriate types when dumping /proc/N/stat
Date: Thu, 22 Mar 2012 14:57:12 -0700	[thread overview]
Message-ID: <20120322145712.d9efbc34.akpm@linux-foundation.org> (raw)
In-Reply-To: <1332339136-26022-1-git-send-email-jengelh@medozas.de>

On Wed, 21 Mar 2012 15:12:16 +0100
Jan Engelhardt <jengelh@medozas.de> wrote:

> * field 14, 15: clock_t is a long
> * field 18, 19: task_nice/task_prio return int
> * field 24: get_mm_rss returns unsigned long
> * field 36, 37: always 0
> 
> ...
>
> --- a/fs/proc/array.c
> +++ b/fs/proc/array.c
> @@ -361,7 +361,7 @@ static int do_task_stat(struct seq_file *m, struct pid_namespace *ns,
>  			struct pid *pid, struct task_struct *task, int whole)
>  {
>  	unsigned long vsize, eip, esp, wchan = ~0UL;
> -	long priority, nice;
> +	int priority, nice;
>  	int tty_pgrp = -1, tty_nr = 0;
>  	sigset_t sigign, sigcatch;
>  	char state;
> @@ -463,8 +463,8 @@ static int do_task_stat(struct seq_file *m, struct pid_namespace *ns,
>  	start_time = nsec_to_clock_t(start_time);
>  
>  	seq_printf(m, "%d (%s) %c %d %d %d %d %d %u %lu \
> -%lu %lu %lu %lu %lu %ld %ld %ld %ld %d 0 %llu %lu %ld %lu %lu %lu %lu %lu \
> -%lu %lu %lu %lu %lu %lu %lu %lu %d %d %u %u %llu %lu %ld %lu %lu %lu\n",
> +%lu %lu %lu %ld %ld %ld %ld %d %d %d 0 %llu %lu %lu %lu %lu %lu %lu %lu \
> +%lu %lu %lu %lu %lu %lu 0 0 %d %d %u %u %llu %lu %ld %lu %lu %lu\n",
>  		pid_nr_ns(pid, ns),
>  		tcomm,
>  		state,
> @@ -503,8 +503,6 @@ static int do_task_stat(struct seq_file *m, struct pid_namespace *ns,
>  		sigign      .sig[0] & 0x7fffffffUL,
>  		sigcatch    .sig[0] & 0x7fffffffUL,
>  		wchan,
> -		0UL,
> -		0UL,
>  		task->exit_signal,
>  		task_cpu(task),
>  		task->rt_priority,

When trying to review this I went completely crosseyed then fell on
the floor.  Which is why this code got ripped out and redone in
linux-next, against which I'll ask you to redo the patch, please.



  reply	other threads:[~2012-03-22 21:57 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-21 14:12 [PATCH] procfs: use more apprioriate types when dumping /proc/N/stat Jan Engelhardt
2012-03-22 21:57 ` Andrew Morton [this message]
2012-04-04 13:12   ` Jan Engelhardt

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20120322145712.d9efbc34.akpm@linux-foundation.org \
    --to=akpm@linux-foundation.org \
    --cc=gorcunov@openvz.org \
    --cc=jengelh@medozas.de \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox