[Devel] Re: [PATCH 3/3] Replace pid_t in autofs4 with struct pid reference.
Eric W. Biederman
ebiederm at xmission.com
Fri Mar 9 09:37:59 PST 2007
sukadev at us.ibm.com writes:
> Index: lx26-20-mm2c/fs/autofs4/waitq.c
> ===================================================================
> --- lx26-20-mm2c.orig/fs/autofs4/waitq.c 2007-02-28 14:48:35.000000000 -0800
> +++ lx26-20-mm2c/fs/autofs4/waitq.c 2007-02-28 15:47:21.000000000 -0800
> @@ -296,8 +296,8 @@ int autofs4_wait(struct autofs_sb_info *
> wq->ino = autofs4_get_ino(sbi);
> wq->uid = current->uid;
> wq->gid = current->gid;
> - wq->pid = current->pid;
> - wq->tgid = current->tgid;
> + wq->pid = pid_nr(task_pid(current));
> + wq->tgid = pid_nr(task_tgid(current));
> wq->status = -EINTR; /* Status return if interrupted */
> atomic_set(&wq->wait_ctr, 2);
> mutex_unlock(&sbi->wq_mutex);
I don't quite follow all of the waitq logic but it looks like these
values are cached in the kernel and then eventually passed to a user
space daemon.
Which looks to me like the wait queue should have a struct pid * and
we should call pid_nr in the daemon process context. Otherwise the
daemon might see the wrong pid values.
So I think autofs4 needs some more work.
Eric
_______________________________________________
Containers mailing list
Containers at lists.osdl.org
https://lists.osdl.org/mailman/listinfo/containers
More information about the Devel
mailing list