Author: hawk                         Date: Wed Nov 12 18:30:00 2008 GMT
Module: SOURCES                       Tag: Titanium
---- Log message:
- back to patch-2.6.27.3-vs2.3.0.35.7.diff, newer one breaks /proc

---- Files affected:
SOURCES:
   linux-2.6-vs2.3.patch (1.1.2.17.2.25 -> 1.1.2.17.2.26) 

---- Diffs:

================================================================
Index: SOURCES/linux-2.6-vs2.3.patch
diff -u SOURCES/linux-2.6-vs2.3.patch:1.1.2.17.2.25 
SOURCES/linux-2.6-vs2.3.patch:1.1.2.17.2.26
--- SOURCES/linux-2.6-vs2.3.patch:1.1.2.17.2.25 Tue Nov  4 10:13:02 2008
+++ SOURCES/linux-2.6-vs2.3.patch       Wed Nov 12 19:29:52 2008
@@ -1612,7 +1612,7 @@
                retval = -1;
        return retval;
 diff -NurpP --minimal linux-2.6.27.4/drivers/char/tty_io.c 
linux-2.6.27.4-vs2.3.0.35.9/drivers/char/tty_io.c
---- linux-2.6.27.4/drivers/char/tty_io.c       2008-10-30 01:14:41.000000000 
+0100
+--- linux-2.6.27.4/drivers/char/tty_io.c       2008-10-24 02:21:28.000000000 
+0200
 +++ linux-2.6.27.4-vs2.3.0.35.9/drivers/char/tty_io.c  2008-10-24 
02:21:46.000000000 +0200
 @@ -106,6 +106,7 @@
  
@@ -3379,7 +3379,7 @@
                ext4_std_error(sb, fatal);
 diff -NurpP --minimal linux-2.6.27.4/fs/ext4/ext4.h 
linux-2.6.27.4-vs2.3.0.35.9/fs/ext4/ext4.h
 --- linux-2.6.27.4/fs/ext4/ext4.h      2008-10-13 14:52:05.000000000 +0200
-+++ linux-2.6.27.4-vs2.3.0.35.9/fs/ext4/ext4.h 2008-10-31 18:15:18.000000000 
+0100
++++ linux-2.6.27.4-vs2.3.0.35.9/fs/ext4/ext4.h 2008-10-24 03:34:52.000000000 
+0200
 @@ -242,8 +242,12 @@ struct flex_groups {
  #define EXT4_HUGE_FILE_FL               0x00040000 /* Set to each huge file */
  #define EXT4_EXTENTS_FL                       0x00080000 /* Inode uses 
extents */
@@ -3387,7 +3387,7 @@
 +#define EXT4_IXUNLINK_FL              0x08000000 /* Immutable invert on 
unlink */
  #define EXT4_RESERVED_FL              0x80000000 /* reserved for ext4 lib */
  
-+#define EXT4_BARRIER_FL                       0x04000000 /* Barrier for 
chroot() */
++#define EXT4_BARRIER_FL                       0x10000000 /* Barrier for 
chroot() */
 +#define EXT4_COW_FL                   0x20000000 /* Copy on Write marker */
 +
  #define EXT4_FL_USER_VISIBLE          0x000BDFFF /* User visible flags */
@@ -4162,7 +4162,7 @@
                                err = -EPERM;
 diff -NurpP --minimal linux-2.6.27.4/fs/jfs/jfs_dinode.h 
linux-2.6.27.4-vs2.3.0.35.9/fs/jfs/jfs_dinode.h
 --- linux-2.6.27.4/fs/jfs/jfs_dinode.h 2008-07-13 23:51:29.000000000 +0200
-+++ linux-2.6.27.4-vs2.3.0.35.9/fs/jfs/jfs_dinode.h    2008-10-31 
18:15:18.000000000 +0100
++++ linux-2.6.27.4-vs2.3.0.35.9/fs/jfs/jfs_dinode.h    2008-10-24 
03:34:52.000000000 +0200
 @@ -161,9 +161,13 @@ struct dinode {
  
  #define JFS_APPEND_FL         0x01000000 /* writes to file may only append */
@@ -4171,7 +4171,7 @@
  
 -#define JFS_FL_USER_VISIBLE   0x03F80000
 -#define JFS_FL_USER_MODIFIABLE        0x03F80000
-+#define JFS_BARRIER_FL                0x04000000 /* Barrier for chroot() */
++#define JFS_BARRIER_FL                0x10000000 /* Barrier for chroot() */
 +#define JFS_COW_FL            0x20000000 /* Copy on Write marker */
 +
 +#define JFS_FL_USER_VISIBLE   0x07F80000
@@ -5045,7 +5045,7 @@
        return 0;
 diff -NurpP --minimal linux-2.6.27.4/fs/namei.c 
linux-2.6.27.4-vs2.3.0.35.9/fs/namei.c
 --- linux-2.6.27.4/fs/namei.c  2008-10-13 14:52:05.000000000 +0200
-+++ linux-2.6.27.4-vs2.3.0.35.9/fs/namei.c     2008-10-31 18:18:18.000000000 
+0100
++++ linux-2.6.27.4-vs2.3.0.35.9/fs/namei.c     2008-10-24 03:52:44.000000000 
+0200
 @@ -31,6 +31,14 @@
  #include <linux/file.h>
  #include <linux/fcntl.h>
@@ -5061,7 +5061,7 @@
  #include <asm/uaccess.h>
  
  #define ACC_MODE(x) ("\000\004\002\006"[(x)&O_ACCMODE])
-@@ -167,6 +175,76 @@ void putname(const char *name)
+@@ -167,6 +175,59 @@ void putname(const char *name)
  EXPORT_SYMBOL(putname);
  #endif
  
@@ -5074,38 +5074,31 @@
 +      return 0;
 +}
 +
-+static int __dx_permission(struct inode *inode, int mask)
++int dx_permission(struct inode *inode, int mask)
 +{
++      if (vx_check(0, VS_ADMIN | VS_WATCH))
++              return 0;
++
 +      if (dx_barrier(inode))
 +              return -EACCES;
 +
 +      if (inode->i_sb->s_magic == DEVPTS_SUPER_MAGIC) {
 +              /* devpts is xid tagged */
 +              if (S_ISDIR(inode->i_mode) ||
-+                  vx_check((xid_t)inode->i_tag, VS_IDENT | VS_WATCH_P))
++                  vx_check((xid_t)inode->i_tag, VS_IDENT))
 +                      return 0;
 +      }
 +      else if (inode->i_sb->s_magic == PROC_SUPER_MAGIC) {
-+              struct proc_dir_entry *de = PDE(inode);
-+
-+              if (de && !vx_hide_check(0, de->vx_flags))
-+                      goto out;
-+
++              struct pid *pid = PROC_I(inode)->pid;
++              struct task_struct *tsk;
 +              if ((mask & (MAY_WRITE | MAY_APPEND))) {
-+                      struct pid *pid;
-+                      struct task_struct *tsk;
-+
-+                      if (vx_check(0, VS_ADMIN | VS_WATCH_P))
-+                              return 0;
-+
-+                      pid = PROC_I(inode)->pid;
 +                      if (!pid)
 +                              goto out;
 +
 +                      tsk = pid_task(pid, PIDTYPE_PID);
 +                      vxdprintk(VXD_CBIT(tag, 0), "accessing %p[#%u]",
-+                                tsk, (tsk ? vx_task_xid(tsk) : 0));
-+                      if (tsk && vx_check(vx_task_xid(tsk), VS_IDENT | 
VS_WATCH_P))
++                                     tsk, (tsk ? vx_task_xid(tsk) : 0));
++                      if (tsk && vx_check(vx_task_xid(tsk), VS_IDENT))
 +                              return 0;
 +              }
 +              else {
@@ -5115,30 +5108,20 @@
 +      }
 +      else {
 +              if (dx_notagcheck(inode->i_sb) ||
-+                  dx_check(inode->i_tag, DX_HOSTID | DX_ADMIN | DX_WATCH |
-+                           DX_IDENT))
++                  dx_check(inode->i_tag, 
DX_HOSTID|DX_ADMIN|DX_WATCH|DX_IDENT))
 +                      return 0;
 +      }
 +
 +out:
++      vxwprintk_task(1, "denied access to %s:%p[#%d,%lu].",
++              inode->i_sb->s_id, inode, inode->i_tag, inode->i_ino);
 +      return -EACCES;
 +}
 +
-+int dx_permission(struct inode *inode, int mask)
-+{
-+      int ret = __dx_permission(inode, mask);
-+      if (unlikely(ret)) {
-+              vxwprintk_task(1, "denied %x access to %s:%p[#%d,%lu]",
-+                      mask, inode->i_sb->s_id, inode, inode->i_tag,
-+                      inode->i_ino);
-+      }
-+      return ret;
-+}
-+
  
  /**
   * generic_permission  -  check for access rights on a Posix-like filesystem
-@@ -244,10 +322,14 @@ int inode_permission(struct inode *inode
+@@ -244,10 +305,14 @@ int inode_permission(struct inode *inode
                /*
                 * Nobody gets write access to an immutable file.
                 */
@@ -5154,7 +5137,7 @@
        /* Ordinary permission routines do not understand MAY_APPEND. */
        if (inode->i_op && inode->i_op->permission) {
                retval = inode->i_op->permission(inode, mask);
-@@ -451,6 +533,8 @@ static int exec_permission_lite(struct i
+@@ -451,6 +516,8 @@ static int exec_permission_lite(struct i
  {
        umode_t mode = inode->i_mode;
  
@@ -5163,7 +5146,7 @@
        if (inode->i_op && inode->i_op->permission)
                return -EAGAIN;
  
-@@ -773,7 +857,8 @@ static __always_inline void follow_dotdo
+@@ -773,7 +840,8 @@ static __always_inline void follow_dotdo
                if (nd->path.dentry == fs->root.dentry &&
                    nd->path.mnt == fs->root.mnt) {
                          read_unlock(&fs->lock);
@@ -5173,7 +5156,7 @@
                }
                  read_unlock(&fs->lock);
                spin_lock(&dcache_lock);
-@@ -810,16 +895,30 @@ static int do_lookup(struct nameidata *n
+@@ -810,16 +878,39 @@ static int do_lookup(struct nameidata *n
  {
        struct vfsmount *mnt = nd->path.mnt;
        struct dentry *dentry = __d_lookup(nd->path.dentry, name);
@@ -5187,24 +5170,33 @@
 +      if (!inode)
 +              goto done;
 +
-+      if (__dx_permission(inode, MAY_ACCESS))
-+              goto hidden;
++      if (inode->i_sb->s_magic == PROC_SUPER_MAGIC) {
++              struct proc_dir_entry *de = PDE(inode);
 +
++              if (de && !vx_hide_check(0, de->vx_flags))
++                      goto hidden;
++      } else if (inode->i_sb->s_magic == DEVPTS_SUPER_MAGIC) {
++              if (!vx_check((xid_t)inode->i_tag, VS_WATCH_P | VS_IDENT))
++                      goto hidden;
++      } else {
++              if (!dx_notagcheck(inode->i_sb) && !dx_check(inode->i_tag,
++                      DX_WATCH | DX_ADMIN | DX_HOSTID | DX_IDENT))
++                      goto hidden;
++      }
  done:
        path->mnt = mnt;
        path->dentry = dentry;
        __follow_mount(path);
        return 0;
 +hidden:
-+      vxwprintk_task(1, "did lookup hidden %s:%p[#%d,%lu] �%s�.",
-+              inode->i_sb->s_id, inode, inode->i_tag, inode->i_ino,
-+              vxd_path(&nd->path));
++      vxwprintk_task(1, "did lookup hidden %p[#%d,%lu] �%s�.",
++              inode, inode->i_tag, inode->i_ino, vxd_path(&nd->path));
 +      dput(dentry);
 +      return -ENOENT;
  
  need_lookup:
        dentry = real_lookup(nd->path.dentry, name, nd);
-@@ -1407,7 +1506,7 @@ static int may_delete(struct inode *dir,
+@@ -1407,7 +1498,7 @@ static int may_delete(struct inode *dir,
        if (IS_APPEND(dir))
                return -EPERM;
        if (check_sticky(dir, victim->d_inode)||IS_APPEND(victim->d_inode)||
@@ -5213,7 +5205,7 @@
                return -EPERM;
        if (isdir) {
                if (!S_ISDIR(victim->d_inode->i_mode))
-@@ -1551,6 +1650,14 @@ int may_open(struct nameidata *nd, int a
+@@ -1551,6 +1642,14 @@ int may_open(struct nameidata *nd, int a
                flag &= ~O_TRUNC;
        }
  
@@ -5228,7 +5220,7 @@
        error = vfs_permission(nd, acc_mode);
        if (error)
                return error;
-@@ -1677,6 +1784,11 @@ struct file *do_filp_open(int dfd, const
+@@ -1677,6 +1776,11 @@ struct file *do_filp_open(int dfd, const
        int will_write;
        int flag = open_to_namei_flags(open_flag);
  
@@ -5240,7 +5232,7 @@
        acc_mode = MAY_OPEN | ACC_MODE(flag);
  
        /* O_TRUNC implies we need access checks for write permissions */
-@@ -1800,6 +1912,25 @@ ok:
+@@ -1800,6 +1904,25 @@ ok:
                        goto exit;
        }
        error = may_open(&nd, acc_mode, flag);
@@ -5266,7 +5258,7 @@
        if (error) {
                if (will_write)
                        mnt_drop_write(nd.path.mnt);
-@@ -1952,9 +2083,17 @@ int vfs_mknod(struct inode *dir, struct 
+@@ -1952,9 +2075,17 @@ int vfs_mknod(struct inode *dir, struct 
        if (error)
                return error;
  
@@ -5285,7 +5277,7 @@
        if (!dir->i_op || !dir->i_op->mknod)
                return -EPERM;
  
-@@ -2395,7 +2534,7 @@ int vfs_link(struct dentry *old_dentry, 
+@@ -2395,7 +2526,7 @@ int vfs_link(struct dentry *old_dentry, 
        /*
         * A link to an append-only or immutable file cannot be created.
         */
@@ -5294,7 +5286,7 @@
                return -EPERM;
        if (!dir->i_op || !dir->i_op->link)
                return -EPERM;
-@@ -2756,6 +2895,214 @@ int vfs_follow_link(struct nameidata *nd
+@@ -2756,6 +2887,214 @@ int vfs_follow_link(struct nameidata *nd
        return __vfs_follow_link(nd, link);
  }
  
@@ -8302,7 +8294,7 @@
  #define clear_opt(o, opt)             o &= ~EXT2_MOUNT_##opt
 diff -NurpP --minimal linux-2.6.27.4/include/linux/ext3_fs.h 
linux-2.6.27.4-vs2.3.0.35.9/include/linux/ext3_fs.h
 --- linux-2.6.27.4/include/linux/ext3_fs.h     2008-10-13 14:52:09.000000000 
+0200
-+++ linux-2.6.27.4-vs2.3.0.35.9/include/linux/ext3_fs.h        2008-10-31 
18:15:18.000000000 +0100
++++ linux-2.6.27.4-vs2.3.0.35.9/include/linux/ext3_fs.h        2008-10-24 
03:34:52.000000000 +0200
 @@ -173,10 +173,14 @@ struct ext3_group_desc
  #define EXT3_NOTAIL_FL                        0x00008000 /* file tail should 
not be merged */
  #define EXT3_DIRSYNC_FL                       0x00010000 /* dirsync behaviour 
(directories only) */
@@ -8312,7 +8304,7 @@
  
 -#define EXT3_FL_USER_VISIBLE          0x0003DFFF /* User visible flags */
 -#define EXT3_FL_USER_MODIFIABLE               0x000380FF /* User modifiable 
flags */
-+#define EXT3_BARRIER_FL                       0x04000000 /* Barrier for 
chroot() */
++#define EXT3_BARRIER_FL                       0x10000000 /* Barrier for 
chroot() */
 +#define EXT3_COW_FL                   0x20000000 /* Copy on Write marker */
 +
 +#define EXT3_FL_USER_VISIBLE          0x0103DFFF /* User visible flags */
@@ -8355,8 +8347,8 @@
  extern int  ext3_write_inode (struct inode *, int);
 diff -NurpP --minimal linux-2.6.27.4/include/linux/fs.h 
linux-2.6.27.4-vs2.3.0.35.9/include/linux/fs.h
 --- linux-2.6.27.4/include/linux/fs.h  2008-10-13 14:52:09.000000000 +0200
-+++ linux-2.6.27.4-vs2.3.0.35.9/include/linux/fs.h     2008-10-31 
18:18:18.000000000 +0100
-@@ -128,6 +128,9 @@ extern int dir_notify_enable;
++++ linux-2.6.27.4-vs2.3.0.35.9/include/linux/fs.h     2008-10-24 
03:34:52.000000000 +0200
+@@ -128,13 +128,16 @@ extern int dir_notify_enable;
  #define MS_RELATIME   (1<<21) /* Update atime relative to mtime/ctime. */
  #define MS_KERNMOUNT  (1<<22) /* this is a kern_mount call */
  #define MS_I_VERSION  (1<<23) /* Update inode I_version field */
@@ -8366,6 +8358,14 @@
  #define MS_ACTIVE     (1<<30)
  #define MS_NOUSER     (1<<31)
  
+ /*
+  * Superblock flags that can be altered by MS_REMOUNT
+  */
+-#define MS_RMT_MASK   (MS_RDONLY|MS_SYNCHRONOUS|MS_MANDLOCK)
++#define MS_RMT_MASK   (MS_RDONLY|MS_SYNCHRONOUS|MS_MANDLOCK|MS_NOTAGCHECK)
+ 
+ /*
+  * Old magic mount flag and mask
 @@ -154,6 +157,14 @@ extern int dir_notify_enable;
  #define S_NOCMTIME    128     /* Do not update file c/mtime */
  #define S_SWAPFILE    256     /* Do not truncate: swapon got its bmaps */
@@ -8425,7 +8425,7 @@
  
 -#define FS_FL_USER_VISIBLE            0x0003DFFF /* User visible flags */
 -#define FS_FL_USER_MODIFIABLE         0x000380FF /* User modifiable flags */
-+#define FS_BARRIER_FL                 0x04000000 /* Barrier for chroot() */
++#define FS_BARRIER_FL                 0x10000000 /* Barrier for chroot() */
 +#define FS_COW_FL                     0x20000000 /* Copy on Write marker */
  
 +#define FS_FL_USER_VISIBLE            0x0103DFFF /* User visible flags */
@@ -10238,8 +10238,8 @@
 +#endif        /* _VX_CONTEXT_CMD_H */
 diff -NurpP --minimal linux-2.6.27.4/include/linux/vserver/context.h 
linux-2.6.27.4-vs2.3.0.35.9/include/linux/vserver/context.h
 --- linux-2.6.27.4/include/linux/vserver/context.h     1970-01-01 
01:00:00.000000000 +0100
-+++ linux-2.6.27.4-vs2.3.0.35.9/include/linux/vserver/context.h        
2008-10-31 18:15:28.000000000 +0100
-@@ -0,0 +1,178 @@
++++ linux-2.6.27.4-vs2.3.0.35.9/include/linux/vserver/context.h        
2008-10-13 14:54:20.000000000 +0200
+@@ -0,0 +1,176 @@
 +#ifndef _VX_CONTEXT_H
 +#define _VX_CONTEXT_H
 +
@@ -10328,8 +10328,6 @@
 +#include "cacct_def.h"
 +#include "device_def.h"
 +
-+#define VX_SPACES     2
-+
 +struct _vx_info_pc {
 +      struct _vx_sched_pc sched_pc;
 +      struct _vx_cvirt_pc cvirt_pc;
@@ -10343,9 +10341,9 @@
 +      struct vx_info *vx_parent;              /* parent context */
 +      int vx_state;                           /* context state */
 +
-+      unsigned long vx_nsmask[VX_SPACES];     /* assignment mask */
-+      struct nsproxy *vx_nsproxy[VX_SPACES];  /* private namespaces */
-+      struct fs_struct *vx_fs[VX_SPACES];     /* private namespace fs */
++      unsigned long vx_nsmask;                /* assignment mask */
++      struct nsproxy *vx_nsproxy;             /* private namespace */
++      struct fs_struct *vx_fs;                /* private namespace fs */
 +
 +      uint64_t vx_flags;                      /* context flags */
 +      uint64_t vx_ccaps;                      /* context caps (vserver) */
@@ -12500,19 +12498,17 @@
 +#endif        /* _VX_SIGNAL_H */
 diff -NurpP --minimal linux-2.6.27.4/include/linux/vserver/space_cmd.h 
linux-2.6.27.4-vs2.3.0.35.9/include/linux/vserver/space_cmd.h
 --- linux-2.6.27.4/include/linux/vserver/space_cmd.h   1970-01-01 
01:00:00.000000000 +0100
-+++ linux-2.6.27.4-vs2.3.0.35.9/include/linux/vserver/space_cmd.h      
2008-10-31 03:49:36.000000000 +0100
-@@ -0,0 +1,38 @@
++++ linux-2.6.27.4-vs2.3.0.35.9/include/linux/vserver/space_cmd.h      
2008-10-13 14:54:20.000000000 +0200
+@@ -0,0 +1,29 @@
 +#ifndef _VX_SPACE_CMD_H
 +#define _VX_SPACE_CMD_H
 +
 +
 +#define VCMD_enter_space_v0   VC_CMD(PROCALT, 1, 0)
-+#define VCMD_enter_space_v1   VC_CMD(PROCALT, 1, 1)
-+#define VCMD_enter_space      VC_CMD(PROCALT, 1, 2)
++#define VCMD_enter_space      VC_CMD(PROCALT, 1, 1)
 +
 +#define VCMD_set_space_v0     VC_CMD(PROCALT, 3, 0)
-+#define VCMD_set_space_v1     VC_CMD(PROCALT, 3, 1)
-+#define VCMD_set_space                VC_CMD(PROCALT, 3, 2)
++#define VCMD_set_space                VC_CMD(PROCALT, 3, 1)
 +
 +#define VCMD_get_space_mask_v0        VC_CMD(PROCALT, 4, 0)
 +
@@ -12520,20 +12516,13 @@
 +#define VCMD_get_space_default        VC_CMD(VSPACE, 1, 0)
 +
 +
-+struct        vcmd_space_mask_v1 {
++struct        vcmd_space_mask {
 +      uint64_t mask;
 +};
 +
-+struct        vcmd_space_mask_v2 {
-+      uint64_t mask;
-+      uint32_t index;
-+};
-+
 +
 +#ifdef        __KERNEL__
 +
-+extern int vc_enter_space_v1(struct vx_info *, void __user *);
-+extern int vc_set_space_v1(struct vx_info *, void __user *);
 +extern int vc_enter_space(struct vx_info *, void __user *);
 +extern int vc_set_space(struct vx_info *, void __user *);
 +extern int vc_get_space_mask(void __user *, int);
@@ -12542,16 +12531,17 @@
 +#endif        /* _VX_SPACE_CMD_H */
 diff -NurpP --minimal linux-2.6.27.4/include/linux/vserver/space.h 
linux-2.6.27.4-vs2.3.0.35.9/include/linux/vserver/space.h
 --- linux-2.6.27.4/include/linux/vserver/space.h       1970-01-01 
01:00:00.000000000 +0100
-+++ linux-2.6.27.4-vs2.3.0.35.9/include/linux/vserver/space.h  2008-10-31 
04:02:02.000000000 +0100
-@@ -0,0 +1,12 @@
++++ linux-2.6.27.4-vs2.3.0.35.9/include/linux/vserver/space.h  2008-10-13 
14:54:20.000000000 +0200
+@@ -0,0 +1,13 @@
 +#ifndef _VX_SPACE_H
 +#define _VX_SPACE_H
 +
++
 +#include <linux/types.h>
 +
 +struct vx_info;
 +
-+int vx_set_space(struct vx_info *vxi, unsigned long mask, unsigned index);
++int vx_set_space(struct vx_info *vxi, unsigned long mask);
 +
 +#else /* _VX_SPACE_H */
 +#warning duplicate inclusion
@@ -16654,8 +16644,8 @@
 +#endif        /* _VX_CACCT_PROC_H */
 diff -NurpP --minimal linux-2.6.27.4/kernel/vserver/context.c 
linux-2.6.27.4-vs2.3.0.35.9/kernel/vserver/context.c
 --- linux-2.6.27.4/kernel/vserver/context.c    1970-01-01 01:00:00.000000000 
+0100
-+++ linux-2.6.27.4-vs2.3.0.35.9/kernel/vserver/context.c       2008-10-31 
03:56:55.000000000 +0100
-@@ -0,0 +1,1018 @@
++++ linux-2.6.27.4-vs2.3.0.35.9/kernel/vserver/context.c       2008-10-13 
14:54:20.000000000 +0200
+@@ -0,0 +1,1010 @@
 +/*
 + *  linux/kernel/vserver/context.c
 + *
@@ -16830,22 +16820,19 @@
 +{
 +      struct nsproxy *nsproxy;
 +      struct fs_struct *fs;
-+      int index;
 +
 +      might_sleep();
 +
 +      vxi->vx_state |= VXS_SHUTDOWN;
 +      vs_state_change(vxi, VSC_SHUTDOWN);
 +
-+      for (index = 0; index < VX_SPACES; index++) {
-+              nsproxy = xchg(&vxi->vx_nsproxy[index], NULL);
-+              if (nsproxy)
-+                      put_nsproxy(nsproxy);
-+
-+              fs = xchg(&vxi->vx_fs[index], NULL);
-+              if (fs)
-+                      put_fs_struct(fs);
-+      }
++      nsproxy = xchg(&vxi->vx_nsproxy, NULL);
++      fs = xchg(&vxi->vx_fs, NULL);
++
++      if (nsproxy)
++              put_nsproxy(nsproxy);
++      if (fs)
++              put_fs_struct(fs);
 +}
 +
 +/* exported stuff */
@@ -16853,7 +16840,6 @@
 +void free_vx_info(struct vx_info *vxi)
 +{
 +      unsigned long flags;
-+      unsigned index;
 +
 +      /* check for reference counts first */
 +      BUG_ON(atomic_read(&vxi->vx_usecnt));
@@ -16865,11 +16851,8 @@
 +      /* context shutdown is mandatory */
 +      BUG_ON(!vx_info_state(vxi, VXS_SHUTDOWN));
 +
-+      /* nsproxy and fs check */
-+      for (index = 0; index < VX_SPACES; index++) {
-+              BUG_ON(vxi->vx_nsproxy[index]);
-+              BUG_ON(vxi->vx_fs[index]);
-+      }
++      BUG_ON(vxi->vx_nsproxy);
++      BUG_ON(vxi->vx_fs);
 +
 +      spin_lock_irqsave(&vx_info_inactive_lock, flags);
 +      hlist_del(&vxi->vx_hlist);
@@ -17276,8 +17259,7 @@
 +                              goto out;
 +
 +                      old_nsp = xchg(&p->nsproxy, new_nsp);
-+                      vx_set_space(vxi,
-+                              CLONE_NEWUTS | CLONE_NEWIPC | CLONE_NEWUSER, 0);
++                      vx_set_space(vxi, CLONE_NEWUTS | CLONE_NEWIPC | 
CLONE_NEWUSER);
 +                      put_nsproxy(old_nsp);
 +              }
 +      }
@@ -17676,8 +17658,8 @@
 +
 diff -NurpP --minimal linux-2.6.27.4/kernel/vserver/cvirt.c 
linux-2.6.27.4-vs2.3.0.35.9/kernel/vserver/cvirt.c
 --- linux-2.6.27.4/kernel/vserver/cvirt.c      1970-01-01 01:00:00.000000000 
+0100
-+++ linux-2.6.27.4-vs2.3.0.35.9/kernel/vserver/cvirt.c 2008-10-31 
03:49:36.000000000 +0100
-@@ -0,0 +1,300 @@
++++ linux-2.6.27.4-vs2.3.0.35.9/kernel/vserver/cvirt.c 2008-10-13 
14:54:20.000000000 +0200
+@@ -0,0 +1,301 @@
 +/*
 + *  linux/kernel/vserver/cvirt.c
 + *
@@ -17846,10 +17828,11 @@
 +      struct nsproxy *nsproxy;
 +      struct uts_namespace *uts;
 +
++
 +      if (id == VHIN_CONTEXT)
 +              return vxi->vx_name;
 +
-+      nsproxy = vxi->vx_nsproxy[0];
++      nsproxy = vxi->vx_nsproxy;
 +      if (!nsproxy)
 +              return NULL;
 +
@@ -22076,8 +22059,8 @@
 +
 diff -NurpP --minimal linux-2.6.27.4/kernel/vserver/proc.c 
linux-2.6.27.4-vs2.3.0.35.9/kernel/vserver/proc.c
 --- linux-2.6.27.4/kernel/vserver/proc.c       1970-01-01 01:00:00.000000000 
+0100
-+++ linux-2.6.27.4-vs2.3.0.35.9/kernel/vserver/proc.c  2008-10-31 
18:15:28.000000000 +0100
-@@ -0,0 +1,1092 @@
++++ linux-2.6.27.4-vs2.3.0.35.9/kernel/vserver/proc.c  2008-10-13 
14:54:20.000000000 +0200
+@@ -0,0 +1,1086 @@
 +/*
 + *  linux/kernel/vserver/proc.c
 + *
@@ -22206,9 +22189,9 @@
 +
 +      buffer += sprintf(buffer,
 +              "CCaps:\t%016llx\n"
-+              "Spaces:\t%08lx %08lx\n",
++              "Spaces:\t%08lx\n",
 +              (unsigned long long)vxi->vx_ccaps,
-+              vxi->vx_nsmask[0], vxi->vx_nsmask[1]);
++              vxi->vx_nsmask);
 +      return buffer - orig;
 +}
 +
@@ -22230,14 +22213,9 @@
 +      return length;
 +}
 +
-+int proc_vxi_nsproxy0(struct vx_info *vxi, char *buffer)
++int proc_vxi_nsproxy(struct vx_info *vxi, char *buffer)
 +{
-+      return vx_info_proc_nsproxy(vxi->vx_nsproxy[0], buffer);
-+}
-+
-+int proc_vxi_nsproxy1(struct vx_info *vxi, char *buffer)
-+{
-+      return vx_info_proc_nsproxy(vxi->vx_nsproxy[1], buffer);
++      return vx_info_proc_nsproxy(vxi->vx_nsproxy, buffer);
 +}
 +
 +int proc_vxi_cvirt(struct vx_info *vxi, char *buffer)
@@ -22629,8 +22607,7 @@
 +      VINF("status",  S_IRUGO, vxi_status),
 +      VINF("limit",   S_IRUGO, vxi_limit),
 +      VINF("sched",   S_IRUGO, vxi_sched),
-+      VINF("nsproxy", S_IRUGO, vxi_nsproxy0),
-+      VINF("nsproxy1",S_IRUGO, vxi_nsproxy1),
++      VINF("nsproxy", S_IRUGO, vxi_nsproxy),
 +      VINF("cvirt",   S_IRUGO, vxi_cvirt),
 +      VINF("cacct",   S_IRUGO, vxi_cacct),
 +      {}
@@ -23840,8 +23817,8 @@
 +
 diff -NurpP --minimal linux-2.6.27.4/kernel/vserver/space.c 
linux-2.6.27.4-vs2.3.0.35.9/kernel/vserver/space.c
 --- linux-2.6.27.4/kernel/vserver/space.c      1970-01-01 01:00:00.000000000 
+0100
-+++ linux-2.6.27.4-vs2.3.0.35.9/kernel/vserver/space.c 2008-10-31 
18:15:28.000000000 +0100
-@@ -0,0 +1,398 @@
++++ linux-2.6.27.4-vs2.3.0.35.9/kernel/vserver/space.c 2008-10-13 
14:54:20.000000000 +0200
+@@ -0,0 +1,372 @@
 +/*
 + *  linux/kernel/vserver/space.c
 + *
@@ -23883,7 +23860,7 @@
 +#include <net/net_namespace.h>
 +
 +
-+static const struct vcmd_space_mask_v1 space_mask_v0 = {
++static const struct vcmd_space_mask space_mask_v0 = {
 +      .mask = CLONE_FS |
 +              CLONE_NEWNS |
 +              CLONE_NEWUTS |
@@ -23892,7 +23869,7 @@
 +              0
 +};
 +
-+static const struct vcmd_space_mask_v1 space_mask = {
<<Diff was trimmed, longer than 597 lines>>

---- CVS-web:
    
http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/SOURCES/linux-2.6-vs2.3.patch?r1=1.1.2.17.2.25&r2=1.1.2.17.2.26&f=u

_______________________________________________
pld-cvs-commit mailing list
[email protected]
http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit

Reply via email to