OpenVZ Forum


Home » Mailing lists » Devel » [PATCH 0/28] Pid namespaces (two models)
Re: [PATCH 13/28] [PREP 13/14] Miscellaneous preparations in pid namespaces [message #19087 is a reply to message #19082] Fri, 22 June 2007 16:32 Go to previous messageGo to previous message
Sukadev Bhattiprolu is currently offline  Sukadev Bhattiprolu
Messages: 413
Registered: August 2006
Senior Member
Pavel Emelianov [xemul@openvz.org] wrote:
| sukadev@us.ibm.com wrote:
| > Pavel Emelianov [xemul@openvz.org] wrote:
| > | The most important one is moving exit_task_namespaces behind exit_notify
| > | in do_exit() to make it possible to see the task's pid namespace to
| > | properly notify the parent.
| > 
| > Hmm. I think we tried this once a few months ago and got a crash in nfsd
| > See http://lkml.org/lkml/2007/1/17/75
| > 
| >             [<c01f6115>] lockd_down+0x125/0x190
| >             [<c01d26bd>] nfs_free_server+0x6d/0xd0
| >             [<c01d8e9c>] nfs_kill_super+0xc/0x20
| >             [<c0161c5d>] deactivate_super+0x7d/0xa0
| >             [<c0175e0e>] release_mounts+0x6e/0x80
| >             [<c0175e86>] __put_mnt_ns+0x66/0x80
| >             [<c0132b3e>] free_nsproxy+0x5e/0x60
| >                 // exit_task_namespaces() after returning from exit_notify()
| >             [<c011f021>] do_exit+0x791/0x810
| >             [<c011f0c6>] do_group_exit+0x26/0x70
| >             [<c0103142>] sysenter_past_esp+0x5f/0x85
| > 
| > exit_notify() sets current->sighand to NULL and I think lockd_down() called
| > from exit_task_namespaces/__put_mnt_ns() was accesssing current->sighand.
| 
| If sighand is set to NULL and then accessed then how is this related to pid namespace? 

Switching the order of exit_notify() and exit_task_namespaces() is what
caused the problem when we did it before.

If you exit_task_namespaces() before exit_notify() as the mainline code
does, you won't see this bc nfsd would have freed its super by then.

| 
| > Do your other patches in this set tweak something to prevent it ?
| 
| I think no. I'll check it for my current patches.

Buried in that thread was a test case to repro the problem. Maybe that
will help.

| 
| > Thats one of the reasons we had to remove pid_ns from nsproxy and use
| > the pid_ns from pid->upid_list[i]->pid_ns.
| > 
| > Suka
| > 
_______________________________________________
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
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: [PATCH 1/2] containers: implement subsys->post_clone()
Next Topic: [PATCH 00/17] Pid-NS(V3) Enable multiple pid namespaces
Goto Forum:
  


Current Time: Mon Jan 13 13:21:11 GMT 2025

Total time taken to generate the page: 0.03378 seconds