Hi Eric, I fall in a general protection fault with setns: general protection fault: 0000 [#3] DEBUG_PAGEALLOC last sysfs file: /sys/devices/virtual/net/sit0/type CPU 0 Pid: 6843, comm: myattach2 Tainted: G D 2.6.33 #239 / RIP: 0010:[] [] d_hash_and_lookup+0x3d/0x73 RSP: 0018:ffff880034aefd28 EFLAGS: 00010246 RAX: 0000000000019cac RBX: ffff880034aefd78 RCX: 0000000000000000 RDX: ffff880034aefd8a RSI: 0000000000000303 RDI: 0000000000000003 RBP: ffff880034aefd38 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000001 R11: 0000000200000000 R12: 6b6b6b6b6b6b6b6b R13: ffff8800383ef740 R14: 0000000000000014 R15: ffff880034aefd78 FS: 00007f94377816f0(0000) GS:ffffffff8161b000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 000000008005003b CR2: 00007fb88fb8c050 CR3: 0000000034a95000 CR4: 00000000000006f0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400 Process myattach2 (pid: 6843, threadinfo ffff880034aee000, task ffff88003d679048) Stack: ffff880034aefd88 0000000000000001 ffff880034aefdc8 ffffffff8111712a <0> ffff880034aefdc8 0000000000000046 0000000000000000 ffff8800349dcac0 <0> 0000001400000000 ffff8800349dcac0 0000000200019cac ffff880034aefd88 Call Trace: [] proc_flush_task+0x8e/0x283 [] release_task+0x24/0x30f [] wait_consider_task+0x531/0x923 [] do_wait+0xed/0x213 [] ? find_get_pid+0x0/0x66 [] sys_wait4+0x98/0xbb [] ? child_wait_callback+0x0/0x53 [] system_call_fastpath+0x16/0x1b Code: 48 8b 56 08 eb 1f 0f b6 32 ff c9 48 ff c2 48 89 f7 48 c1 e6 04 48 c1 ef 04 48 8d 34 37 48 8d 04 06 48 6b c0 0b 85 c9 75 dd 89 03 <49> 8b 84 24 b8 00 00 00 48 85 c0 74 19 48 8b 40 08 48 85 c0 74 RIP [] d_hash_and_lookup+0x3d/0x73 RSP ---[ end trace 2a26f2e5384ecec1 ]--- That happens when creating a container, attach to it and then kill the container. The program doing the attach is in "attachement" :) That happens if you do: setns() fork(), exec(mycmd). waitpid(). Without the fork / waitpid, that is the current process does exec, the problem does not occur.