public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* Is this racy?
@ 2002-10-07 20:51 Michal Jaegermann
  2002-10-07 21:37 ` Daniel Jacobowitz
  0 siblings, 1 reply; 2+ messages in thread
From: Michal Jaegermann @ 2002-10-07 20:51 UTC (permalink / raw)
  To: linux-kernel

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


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2002-10-07 21:31 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-10-07 20:51 Is this racy? Michal Jaegermann
2002-10-07 21:37 ` Daniel Jacobowitz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox