[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <m17j0j5juc.fsf@ebiederm.dsl.xmission.com>
Date: Mon, 04 Sep 2006 16:48:43 -0600
From: ebiederm@...ssion.com (Eric W. Biederman)
To: KAMEZAWA Hiroyuki <kamezawa.hiroyu@...fujitsu.com>
Cc: LKML <linux-kernel@...r.kernel.org>, Andrew Morton <akpm@...l.org>,
saito.tadashi@...t.fujitsu.com, ak@...e.de
Subject: Re: [RFC][PATCH] ps command race fix take 4 [1/4] callback subroutine
KAMEZAWA Hiroyuki <kamezawa.hiroyu@...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
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists