git://git.onelab.eu
/
linux-2.6.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fedora kernel-2.6.17-1.2142_FC4 patched with stable patch-2.6.17.4-vs2.0.2-rc26.diff
[linux-2.6.git]
/
kernel
/
vserver
/
namespace.c
diff --git
a/kernel/vserver/namespace.c
b/kernel/vserver/namespace.c
index
23bf420
..
84e58c5
100644
(file)
--- a/
kernel/vserver/namespace.c
+++ b/
kernel/vserver/namespace.c
@@
-10,7
+10,6
@@
*
*/
*
*/
-#include <linux/config.h>
#include <linux/utsname.h>
#include <linux/sched.h>
#include <linux/vs_context.h>
#include <linux/utsname.h>
#include <linux/sched.h>
#include <linux/vs_context.h>
@@
-47,7
+46,7
@@
int vx_set_namespace(struct vx_info *vxi, struct namespace *ns, struct fs_struct
return 0;
}
return 0;
}
-int vc_enter_namespace(uint32_t id, void *data)
+int vc_enter_namespace(uint32_t id, void
__user
*data)
{
struct vx_info *vxi;
struct fs_struct *old_fs, *fs;
{
struct vx_info *vxi;
struct fs_struct *old_fs, *fs;
@@
-57,7
+56,7
@@
int vc_enter_namespace(uint32_t id, void *data)
if (!vx_check(0, VX_ADMIN))
return -ENOSYS;
if (!vx_check(0, VX_ADMIN))
return -ENOSYS;
- vxi = lo
cate
_vx_info(id);
+ vxi = lo
okup
_vx_info(id);
if (!vxi)
return -ESRCH;
if (!vxi)
return -ESRCH;
@@
-86,13
+85,13
@@
out_put:
return ret;
}
return ret;
}
-int vc_cleanup_namespace(uint32_t id, void *data)
+int vc_cleanup_namespace(uint32_t id, void
__user
*data)
{
{
- down_write(¤t->namespace->sem);
+
//
down_write(¤t->namespace->sem);
spin_lock(&vfsmount_lock);
umount_unused(current->namespace->root, current->fs);
spin_unlock(&vfsmount_lock);
spin_lock(&vfsmount_lock);
umount_unused(current->namespace->root, current->fs);
spin_unlock(&vfsmount_lock);
- up_write(¤t->namespace->sem);
+
//
up_write(¤t->namespace->sem);
return 0;
}
return 0;
}
@@
-103,11
+102,11
@@
int vc_set_namespace(uint32_t id, void __user *data)
struct vx_info *vxi;
int ret;
struct vx_info *vxi;
int ret;
- if (vx_check(0, VX_ADMIN|VX_WATCH))
- return -ENOSYS;
+ vxi = lookup_vx_info(id);
+ if (!vxi)
+ return -ESRCH;
task_lock(current);
task_lock(current);
- vxi = get_vx_info(current->vx_info);
fs = current->fs;
atomic_inc(&fs->count);
ns = current->namespace;
fs = current->fs;
atomic_inc(&fs->count);
ns = current->namespace;