OpenVZ Forum


Home » Mailing lists » Devel » [PATCH] namespaces: fix race at task exit
Re: [PATCH] namespaces: fix race at task exit [message #17376 is a reply to message #17332] Thu, 25 January 2007 15:20 Go to previous messageGo to previous message
Cedric Le Goater is currently offline  Cedric Le Goater
Messages: 443
Registered: February 2006
Senior Member
Serge E. Hallyn wrote:
> In do_exit(), the exit_task_namespaces() was placed after
> exit_notify() because exit_notify ends up using the pid
> namespace both to access the reaper, and for detaching the
> pid.  However, this placement allows an nfs server to reap
> the task before exit_task_namespaces() completes.
> 
> This patch moves the exit_task_namespaces() into release_task,
> below release_thread() which puts the pids(), and just above
> the call_rcu(delayed_put_task_struct).  I believe this should
> solve both problems.
> 
> Signed-off-by: Serge E. Hallyn <serue@us.ibm.com>

I've run some tests on x86 and x86_64: mounted a NFS share after 
having unshare(CLONE_NEWNS) and I didn't reproduce the bug Daniel 
had found. 

it looks safe.

C.
 

_______________________________________________
Containers mailing list
Containers@lists.osdl.org
https://lists.osdl.org/mailman/listinfo/containers
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: [PATCH RFC 2/31] net: Implement a place holder network namespace
Next Topic: [RFC][PATCH 1/3]: Replace pid_t in autofs with struct pid reference.
Goto Forum:
  


Current Time: Thu Oct 09 07:28:38 GMT 2025

Total time taken to generate the page: 0.12004 seconds