From mboxrd@z Thu Jan 1 00:00:00 1970 From: ebiederm-aS9lmoZGLiVWk0Htik3J/w@public.gmane.org (Eric W. Biederman) Subject: Re: [PATCH 1/5] pid: add new iterative macros to list processes in a namespace Date: Thu, 18 Dec 2008 09:45:24 -0800 Message-ID: References: <1229618553-6348-1-git-send-email-gowrishankar.m@linux.vnet.ibm.com> <1229618553-6348-2-git-send-email-gowrishankar.m@linux.vnet.ibm.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1229618553-6348-2-git-send-email-gowrishankar.m-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org> (Gowrishankar M.'s message of "Thu, 18 Dec 2008 22:12:29 +0530") List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: containers-bounces-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org Errors-To: containers-bounces-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org To: Gowrishankar M Cc: Containers , Dave , Sukadev , Balbir List-Id: containers.vger.kernel.org Gowrishankar M writes: > From: Gowrishankar M > > Below patch addresses a common solution for any place where a process > should be checked if it is associated to caller namespace. At present, > we use 'task_pid_vnr(t) > 0' to further proceed with task 't' in current > namespace. > > To avoid applying this check in every userspace code related to PID namespace, > this patch provides two new iterative macros;for_each_process_in_ns and > do_each_thread_in_ns. There may be a point to this, as a cleanup. I am not convinced at the moment that has_group_leader_pid() does the right thing in this context. Can you please send the fix for cap_set_all (adding task_pid_vnr(X) > 1) and then we can revisit possible cleanups. Thanks, Eric