locks: don't call locks_release_private from locks_copy_lock
[cascardo/linux.git] / fs / proc / proc_net.c
index 4677bb7..a63af3e 100644 (file)
@@ -113,9 +113,11 @@ static struct net *get_proc_task_net(struct inode *dir)
        rcu_read_lock();
        task = pid_task(proc_pid(dir), PIDTYPE_PID);
        if (task != NULL) {
-               ns = task_nsproxy(task);
+               task_lock(task);
+               ns = task->nsproxy;
                if (ns != NULL)
                        net = get_net(ns->net_ns);
+               task_unlock(task);
        }
        rcu_read_unlock();