From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Serge E. Hallyn" Subject: Re: [RFC V1] Replace pid_t in autofs4 with struct pid reference. Date: Tue, 12 Oct 2010 10:47:18 -0500 Message-ID: <20101012154718.GA23137@hallyn.com> References: <1286299696-13955-1-git-send-email-daniel.lezcano@free.fr> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: <1286299696-13955-1-git-send-email-daniel.lezcano-GANU6spQydw@public.gmane.org> 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: Daniel Lezcano Cc: "Serge E. Hallyn" , Helmut Lichtenberg , Dave Hansen , Cedric Le Goater , Eric Biederman , containers-qjLDD68F18O7TbgM5vRIOg@public.gmane.org, Ian Kent List-Id: containers.vger.kernel.org Quoting Daniel Lezcano (daniel.lezcano-GANU6spQydw@public.gmane.org): > I resurect and refreshed this old patch from > https://lists.linux-foundation.org/pipermail/containers/2007-February/003726.html > > This patch makes automount to work within a container. > > Make autofs4 container-friendly by caching struct pid reference rather > than pid_t and using pid_nr() to retreive a task's pid_t. > > ChangeLog: > > V1: > - fixed pgrp option in parse_options > - used get_task_pid(current, PIDTYPE_PGID) instead of task_pgrp > - fixed how is passed the 'pgrp' argument autofs4_fill_super > - fixed bad pid conversion, was pid_vnr not pid_nr in autofs4_wait > V0: > - Refreshed against linux-next (added dev-ioctl.c) > - Fix Eric Biederman's comments - Use find_get_pid() to hold a > reference to oz_pgrp and release while unmounting; separate out > changes to autofs and autofs4. > - Also rollback my earlier change to autofs_wait_queue (pid and tgid > in the wait queue are just used to write to a userspace daemon's > pipe). > - Fix Cedric's comments: retain old prototype of parse_options() > and move necessary change to its caller. > > Signed-off-by: Sukadev Bhattiprolu > Signed-off-by: Daniel Lezcano > Cc: Ian Kent > Cc: Cedric Le Goater > Cc: Dave Hansen > Cc: Serge E. Hallyn Acked-by: Serge E. Hallyn Thanks, Daniel, this looks good! Thanks for pushing this needed fix. -serge