kernel is crashing in scheduler_tick() for unknown reasons; back out Proper patches...
authorMark Huang <mlhuang@cs.princeton.edu>
Tue, 30 Nov 2004 23:13:02 +0000 (23:13 +0000)
committerMark Huang <mlhuang@cs.princeton.edu>
Tue, 30 Nov 2004 23:13:02 +0000 (23:13 +0000)
Makefile
fs/ioctl.c
fs/namei.c
include/linux/vserver/inode.h
kernel/vserver/inode.c
scripts/kernel-2.6-planetlab.spec

index f18a393..f43c736 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,7 +1,7 @@
 VERSION = 2
 PATCHLEVEL = 6
 SUBLEVEL = 8
-EXTRAVERSION = -1.521.2.3.planetlab
+EXTRAVERSION = -1.521.2.4.planetlab
 NAME=Zonked Quokka
 
 # *DOCUMENTATION*
index 6404b0c..96a1b60 100644 (file)
@@ -173,19 +173,6 @@ asmlinkage long sys_ioctl(unsigned int fd, unsigned int cmd, unsigned long arg)
                                error = vx_proc_ioctl(filp->f_dentry->d_inode, filp, cmd, arg);
                        break;
 #endif
-               case FIOC_SETIATTR:
-               case FIOC_GETIATTR:
-                       /*
-                        * Verify that this filp is a file object,
-                        * not (say) a socket.
-                        */
-                       error = -ENOTTY;
-                       if (S_ISREG(filp->f_dentry->d_inode->i_mode) ||
-                           S_ISDIR(filp->f_dentry->d_inode->i_mode))
-                               error = vc_iattr_ioctl(filp->f_dentry,
-                                                      cmd, arg);
-                       break;
-
                default:
                        error = -ENOTTY;
                        if (S_ISREG(filp->f_dentry->d_inode->i_mode))
index 656430d..4b3e1ca 100644 (file)
@@ -214,6 +214,20 @@ int vfs_permission(struct inode * inode, int mask)
        return -EACCES;
 }
 
+static inline int xid_permission(struct inode *inode, int mask, struct nameidata *nd)
+{
+       if (inode->i_xid == 0)
+               return 0;
+       if (vx_check(inode->i_xid, VX_ADMIN|VX_WATCH|VX_IDENT))
+               return 0;
+/*
+       printk("VSW: xid=%d denied access to %p[#%d,%lu] »%*s«.\n",
+               vx_current_xid(), inode, inode->i_xid, inode->i_ino,
+               nd->dentry->d_name.len, nd->dentry->d_name.name);
+*/
+       return -EACCES;
+}
+
 int permission(struct inode * inode,int mask, struct nameidata *nd)
 {
        int retval;
@@ -227,6 +241,8 @@ int permission(struct inode * inode,int mask, struct nameidata *nd)
                (S_ISREG(mode) || S_ISDIR(mode) || S_ISLNK(mode)))
                return -EROFS;
 
+       if ((retval = xid_permission(inode, mask, nd)))
+               return retval;
        if (inode->i_op && inode->i_op->permission)
                retval = inode->i_op->permission(inode, submask, nd);
        else
index e19632d..fc49aba 100644 (file)
@@ -57,10 +57,6 @@ extern int vc_set_iattr_v0(uint32_t, void __user *);
 extern int vc_get_iattr(uint32_t, void __user *);
 extern int vc_set_iattr(uint32_t, void __user *);
 
-extern int vc_iattr_ioctl(struct dentry *de,
-                         unsigned int cmd,
-                         unsigned long arg);
-
 #endif /* __KERNEL__ */
 
 /* inode ioctls */
@@ -68,7 +64,4 @@ extern int vc_iattr_ioctl(struct dentry *de,
 #define FIOC_GETXFLG   _IOR('x', 5, long)
 #define FIOC_SETXFLG   _IOW('x', 6, long)
 
-#define FIOC_GETIATTR   _IOR('x', 7, long)
-#define FIOC_SETIATTR   _IOR('x', 8, long)
-
 #endif /* _VX_INODE_H */
index 3e8120b..dda8818 100644 (file)
@@ -170,37 +170,6 @@ int vc_set_iattr(uint32_t id, void __user *data)
        return ret;
 }
 
-int vc_iattr_ioctl(struct dentry *de, unsigned int cmd, unsigned long arg)
-{
-       void __user *data = (void __user *)arg;
-       struct vcmd_ctx_iattr_v1 vc_data;
-       int ret;
-
-       /*
-        * I don't think we need any dget/dput pairs in here as long as
-        * this function is always called from sys_ioctl i.e., de is
-         * a field of a struct file that is guaranteed not to be freed.
-        */
-       if (cmd == FIOC_SETIATTR) {
-               if (!capable(CAP_SYS_ADMIN) || !capable(CAP_LINUX_IMMUTABLE))
-                       return -EPERM;
-               if (copy_from_user (&vc_data, data, sizeof(vc_data)))
-                       return -EFAULT;
-               ret = __vc_set_iattr(de,
-                       &vc_data.xid, &vc_data.flags, &vc_data.mask);
-       }
-       else {
-               if (!vx_check(0, VX_ADMIN))
-                       return -ENOSYS;
-               ret = __vc_get_iattr(de->d_inode,
-                       &vc_data.xid, &vc_data.flags, &vc_data.mask);
-       }
-
-       if (!ret && copy_to_user (data, &vc_data, sizeof(vc_data)))
-               ret = -EFAULT;
-       return ret;
-}
-
 
 #ifdef CONFIG_VSERVER_LEGACY           
 #include <linux/proc_fs.h>
index ae03105..f961ec1 100644 (file)
@@ -22,7 +22,7 @@ Summary: The Linux kernel (the core of the Linux operating system)
 %define kversion 2.6.%{sublevel}
 %define rpmversion 2.6.%{sublevel}
 %define rhbsys  %([ -r /etc/beehive-root ] && echo  || echo .`whoami`)
-%define release 1.521.2.3.planetlab%{?date:.%{date}}
+%define release 1.521.2.4.planetlab%{?date:.%{date}}
 %define signmodules 0
 
 %define KVERREL %{PACKAGE_VERSION}-%{PACKAGE_RELEASE}