Driver core: fix error by cleanup up symlinks properly
[safe/jmp/linux-2.6] / kernel / pid.c
index 5319b9f..78f2aee 100644 (file)
@@ -65,7 +65,8 @@ struct pid_namespace init_pid_ns = {
        .pidmap = {
                [ 0 ... PIDMAP_ENTRIES-1] = { ATOMIC_INIT(BITS_PER_PAGE), NULL }
        },
-       .last_pid = 0
+       .last_pid = 0,
+       .child_reaper = &init_task
 };
 
 /*
@@ -210,7 +211,7 @@ struct pid *alloc_pid(void)
        if (!pid)
                goto out;
 
-       nr = alloc_pidmap(&init_pid_ns);
+       nr = alloc_pidmap(current->nsproxy->pid_ns);
        if (nr < 0)
                goto out_free;
 
@@ -352,7 +353,7 @@ struct pid *find_ge_pid(int nr)
                pid = find_pid(nr);
                if (pid)
                        break;
-               nr = next_pidmap(&init_pid_ns, nr);
+               nr = next_pidmap(current->nsproxy->pid_ns, nr);
        } while (nr > 0);
 
        return pid;