mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Oleg Nesterov <oleg@tv-sign.ru>
To: "Eric W. Biederman" <ebiederm@xmission.com>
Cc: Andrew Morton <akpm@osdl.org>,
	linux-kernel@vger.kernel.org,
	"Paul E. McKenney" <paulmck@us.ibm.com>,
	Ingo Molnar <mingo@elte.hu>, William Irwin <wli@holomorphy.com>,
	Roland McGrath <roland@redhat.com>
Subject: Re: [PATCH] task: Make task list manipulations RCU safe.
Date: Tue, 14 Mar 2006 20:36:31 +0300	[thread overview]
Message-ID: <4416FF1F.5DA06CFB@tv-sign.ru> (raw)
In-Reply-To: <m1bqwgx4za.fsf@ebiederm.dsl.xmission.com>

Some questions.

first_tgid:
	...
	for (; pos && pid_alive(pos); pos = next_task(pos))

I think this patch makes this 'pid_alive(pos)' unneeded?

next_tgid:
	rcu_read_lock();
	pos = start;
	if (pid_alive(start))
		pos = next_task(start);
	if (pid_alive(pos) && (pos != &init_task)) {
		get_task_struct(pos);
		goto done;
	}

The first 'pid_alive()' check is quite understandable.
What about the second one? I beleive, now it is unneeded
as well. The same for first_tid/next_tid.

Also, first_tid() does 'task_lock(leader)' while reading
->signal->count. Why? ->signal is protected by ->siglock,
but we don't need any locks because ->signal is rcu safe.
Same for proc_task_getattr(), s/task_lock/rcu_read_lock/.

Oleg.

  reply	other threads:[~2006-03-14 17:39 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-03-08 16:42 Eric W. Biederman
2006-03-14 17:36 ` Oleg Nesterov [this message]
2006-03-14 18:06   ` Eric W. Biederman
2006-03-14 18:26     ` Oleg Nesterov
2006-03-14 20:15       ` Eric W. Biederman

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=4416FF1F.5DA06CFB@tv-sign.ru \
    --to=oleg@tv-sign.ru \
    --cc=akpm@osdl.org \
    --cc=ebiederm@xmission.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=paulmck@us.ibm.com \
    --cc=roland@redhat.com \
    --cc=wli@holomorphy.com \
    /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

all inboxes | Powered by JetHome®