OpenVZ Forum


Home » Mailing lists » Devel » [PATCH 3/3] Replace pid_t in autofs4 with struct pid reference.
Re: [PATCH 3/3] Replace pid_t in autofs4 with struct pid reference. [message #17636 is a reply to message #17547] Fri, 09 March 2007 17:37 Go to previous message
ebiederm is currently offline  ebiederm
Messages: 1354
Registered: February 2006
Senior Member
sukadev@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@lists.osdl.org
https://lists.osdl.org/mailman/listinfo/containers
 
Read Message
Read Message
Previous Topic: [PATCH 2/3] Replace pid_t in autofs with struct pid reference
Next Topic: Re: [ckrm-tech] [PATCH 0/2] resource control file system - aka containers on top of nsproxy!
Goto Forum:
  


Current Time: Thu Oct 16 17:03:18 GMT 2025

Total time taken to generate the page: 0.46316 seconds