The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: ebiederm@xmission.com (Eric W. Biederman)
To: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Cc: LKML <linux-kernel@vger.kernel.org>,
	Andrew Morton <akpm@osdl.org>,
	saito.tadashi@soft.fujitsu.com, ak@suse.de
Subject: Re: [RFC][PATCH] ps command race fix take 4 [1/4] callback subroutine
Date: Mon, 04 Sep 2006 16:48:43 -0600	[thread overview]
Message-ID: <m17j0j5juc.fsf@ebiederm.dsl.xmission.com> (raw)
In-Reply-To: <20060825182505.5e9ddc8f.kamezawa.hiroyu@jp.fujitsu.com> (KAMEZAWA Hiroyuki's message of "Fri, 25 Aug 2006 18:25:05 +0900")

KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com> writes:

> Updated some dirty codes. maybe easier to read than previous one.
>
> This ps command fix (proc_pid_readdir() fix) fixes the problem by
>
> - attach a callback for updating pointer from file descriptor to a task invoked
>   at release_task()
> - no additional global lock is required.
> - walk through all and only task structs which is thread group leader.
>
> *Bad* point is adding additonal (small) lock and callback in exit path.
With an unbounded callback chain length influenced by user space.

My gut feel is that you have just about reinvented struct pid.
All you need to do now is to move the task list or a version
of it into struct pid and you can reference count the existing
structure.

Eric

  reply	other threads:[~2006-09-04 22:49 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-08-25  9:25 [RFC][PATCH] ps command race fix take 4 [1/4] callback subroutine KAMEZAWA Hiroyuki
2006-09-04 22:48 ` Eric W. Biederman [this message]
2006-09-05  1:41   ` KAMEZAWA Hiroyuki

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=m17j0j5juc.fsf@ebiederm.dsl.xmission.com \
    --to=ebiederm@xmission.com \
    --cc=ak@suse.de \
    --cc=akpm@osdl.org \
    --cc=kamezawa.hiroyu@jp.fujitsu.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=saito.tadashi@soft.fujitsu.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