Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 357777
b: refs/heads/master
c: 9fd973e
h: refs/heads/master
i:
  357775: 9e6770c
v: v3
  • Loading branch information
Eric W. Biederman committed Feb 13, 2013
1 parent ee42b8d commit 240fcd2
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: a0a5386ac6400493cc2eb8b58583e56af0708730
refs/heads/master: 9fd973e085f7759f710603422b2e11ad5f2e000d
4 changes: 4 additions & 0 deletions trunk/fs/coda/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
#include <linux/file.h>
#include <linux/vfs.h>
#include <linux/slab.h>
#include <linux/pid_namespace.h>

#include <asm/uaccess.h>

Expand Down Expand Up @@ -157,6 +158,9 @@ static int coda_fill_super(struct super_block *sb, void *data, int silent)
int error;
int idx;

if (task_active_pid_ns(current) != &init_pid_ns)
return -EINVAL;

idx = get_device_index((struct coda_mount_data *) data);

/* Ignore errors in data, for backward compatibility */
Expand Down
4 changes: 4 additions & 0 deletions trunk/fs/coda/psdev.c
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
#include <linux/list.h>
#include <linux/mutex.h>
#include <linux/device.h>
#include <linux/pid_namespace.h>
#include <asm/io.h>
#include <asm/poll.h>
#include <asm/uaccess.h>
Expand Down Expand Up @@ -266,6 +267,9 @@ static int coda_psdev_open(struct inode * inode, struct file * file)
struct venus_comm *vcp;
int idx, err;

if (task_active_pid_ns(current) != &init_pid_ns)
return -EINVAL;

idx = iminor(inode);
if (idx < 0 || idx >= MAX_CODADEVS)
return -ENODEV;
Expand Down
4 changes: 2 additions & 2 deletions trunk/fs/coda/upcall.c
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@ static void *alloc_upcall(int opcode, int size)
return ERR_PTR(-ENOMEM);

inp->ih.opcode = opcode;
inp->ih.pid = current->pid;
inp->ih.pgid = task_pgrp_nr(current);
inp->ih.pid = task_pid_nr_ns(current, &init_pid_ns);
inp->ih.pgid = task_pgrp_nr_ns(current, &init_pid_ns);
inp->ih.uid = current_fsuid();

return (void*)inp;
Expand Down

0 comments on commit 240fcd2

Please sign in to comment.