OpenVZ Forum


Home » Mailing lists » Devel » [PATCH 2/2] Replace pid_t in autofs with struct pid reference
Re: [PATCH 2/2] Replace pid_t in autofs with struct pid reference [message #17899 is a reply to message #17758] Tue, 20 March 2007 22:01 Go to previous messageGo to previous message
ebiederm is currently offline  ebiederm
Messages: 1354
Registered: February 2006
Senior Member
"Serge E. Hallyn" <serue@us.ibm.com> writes:

>> >  void autofs4_dentry_release(struct dentry *);
>> >  extern void autofs4_kill_sb(struct super_block *);
>> > diff --git a/fs/autofs4/waitq.c b/fs/autofs4/waitq.c
>> > index 9857543..4a9ad9b 100644
>> > --- a/fs/autofs4/waitq.c
>> > +++ b/fs/autofs4/waitq.c
>> > @@ -141,8 +141,8 @@ static void autofs4_notify_daemon(struct
>> >  		packet->ino = wq->ino;
>> >  		packet->uid = wq->uid;
>> >  		packet->gid = wq->gid;
>> > -		packet->pid = wq->pid;
>> > -		packet->tgid = wq->tgid;
>> > +		packet->pid = pid_nr(wq->pid);
>> > +		packet->tgid = pid_nr(wq->tgid);
>> >  		break;
>> 
>> I'm assuming we build the packet in the process context of the
>> daemon we are sending it to.  If not we have a problem here.
>
> Yes this is data being sent to a userspace daemon (Ian pls correct me if
> I'm wrong) so the pid_nr is the only thing we can send.

Agreed.  The question is are we in the user space daemon's process when
we generate the pid_nr.  Or do we stuff this in some kind of socket,
and the socket switch locations of the packet.

Basically I'm just trying to be certain we are calling pid_nr in the
proper context.  Otherwise we could get the wrong pid when we have
multiple pid namespaces in play.

Eric
_______________________________________________
Containers mailing list
Containers@lists.linux-foundation.org
https://lists.linux-foundation.org/mailman/listinfo/containers
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: Re: [PATCHSET] 2.6.20-lxc8
Next Topic: 2.6.20-lxc8 - compilation error
Goto Forum:
  


Current Time: Wed Aug 06 11:58:12 GMT 2025

Total time taken to generate the page: 1.41285 seconds