public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Michal Jaegermann <michal@harddata.com>
To: linux-kernel@vger.kernel.org
Subject: Is this racy?
Date: Mon, 7 Oct 2002 14:51:52 -0600	[thread overview]
Message-ID: <20021007145152.A4065@mail.harddata.com> (raw)

In fs/proc/array.c (2.4.20-pre9, 2.4.19 and likely many other
versions) in function 'proc_pid_stat()' there is a code like that:

	......
	read_lock(&tasklist_lock);
	ppid = task->pid ? task->p_opptr->pid : 0;
	read_unlock(&tasklist_lock);
	res = sprintf(buffer,"<long format string>",
		task->pid,
		......
		ppid,
		......

So assignment to ppid is locked but other reads from fiels of 'task'
structure are not guarded that way.  Is this ok or if not we do not
particularly care?  Function 'task_state()' in the same file seems
to be more careful about this.

  Michal


             reply	other threads:[~2002-10-07 20:47 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-10-07 20:51 Michal Jaegermann [this message]
2002-10-07 21:37 ` Is this racy? Daniel Jacobowitz

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=20021007145152.A4065@mail.harddata.com \
    --to=michal@harddata.com \
    --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