OpenVZ Forum


Home » Mailing lists » Devel » Re: [PATCH] Switch nfs/callback.c to using struct pid, not pid_t
Re: [PATCH] Switch nfs/callback.c to using struct pid, not pid_t [message #19809] Wed, 29 August 2007 13:52
Christoph Hellwig is currently offline  Christoph Hellwig
Messages: 59
Registered: April 2006
Member
On Wed, Aug 29, 2007 at 05:36:24PM +0400, Pavel Emelyanov wrote:
> Pid namespaces make it dangerous to use pid and tgid values
> when run in some namespace. The struct pid itself is going
> to be the only way for working with task pids, so make the
> nfs callback thread use it.
> 
> Since nfs_callback_info.pid is set to current's one and reset
> on the thread exit, it is safe not to get the struct pid. 
> 
> Since this pid is used later under lock_kernel() w/o sleeping 
> operations, checking for i to be not NULL and killing the 
> thread with kill_pid() is safe.

NACK.  This just makes the code even more obscure.  Please get rid
of the pid references entirely and convert the code to the kthread
API.

_______________________________________________
Containers mailing list
Containers@lists.linux-foundation.org
https://lists.linux-foundation.org/mailman/listinfo/containers
Previous Topic: [PATCH] Switch nfs/callback.c to using struct pid, not pid_t
Next Topic: Re: [PATCH] Switch nfs/callback.c to using struct pid, not pid_t
Goto Forum:
  


Current Time: Thu Aug 15 07:26:54 GMT 2024

Total time taken to generate the page: 0.02793 seconds