Merge branch 'stable-3.2' into pandora-3.2
[pandora-kernel.git] / fs / proc / namespaces.c
index be177f7..50de28b 100644 (file)
@@ -54,7 +54,7 @@ static struct dentry *proc_ns_instantiate(struct inode *dir,
        ei->ns_ops    = ns_ops;
        ei->ns        = ns;
 
-       dentry->d_op = &pid_dentry_operations;
+       d_set_d_op(dentry, &pid_dentry_operations);
        d_add(dentry, inode);
        /* Close the race of the process dying before we return the dentry */
        if (pid_revalidate(dentry, NULL))
@@ -91,7 +91,7 @@ static int proc_ns_dir_readdir(struct file *filp, void *dirent,
                goto out_no_task;
 
        ret = -EPERM;
-       if (!ptrace_may_access(task, PTRACE_MODE_READ))
+       if (!ptrace_may_access(task, PTRACE_MODE_READ_FSCREDS))
                goto out;
 
        ret = 0;
@@ -154,7 +154,7 @@ static struct dentry *proc_ns_dir_lookup(struct inode *dir,
                goto out_no_task;
 
        error = ERR_PTR(-EPERM);
-       if (!ptrace_may_access(task, PTRACE_MODE_READ))
+       if (!ptrace_may_access(task, PTRACE_MODE_READ_FSCREDS))
                goto out;
 
        last = &ns_entries[ARRAY_SIZE(ns_entries) - 1];