kernel/ksyms.c | 8 ++++
10 files changed, 222 insertions(+), 49 deletions(-)
---- linux-2.6.0-test1/fs/exec.c~vfs_intent_2.6.0-test1 2003-09-13 16:01:21.000000000 +0400
-+++ linux-2.6.0-test1-alexey/fs/exec.c 2003-09-13 16:21:05.000000000 +0400
+--- linux-2.6.0-test1/fs/exec.c~vfs_intent_2.6.0-test1 2003-09-13 19:08:34.000000000 +0400
++++ linux-2.6.0-test1-alexey/fs/exec.c 2003-09-14 18:13:44.000000000 +0400
@@ -116,8 +116,11 @@ asmlinkage long sys_uselib(const char __
struct file * file;
struct nameidata nd;
if (!IS_ERR(file)) {
err = deny_write_access(file);
if (err) {
---- linux-2.6.0-test1/fs/namei.c~vfs_intent_2.6.0-test1 2003-09-13 16:01:21.000000000 +0400
-+++ linux-2.6.0-test1-alexey/fs/namei.c 2003-09-13 16:21:05.000000000 +0400
+--- linux-2.6.0-test1/fs/namei.c~vfs_intent_2.6.0-test1 2003-09-13 19:08:34.000000000 +0400
++++ linux-2.6.0-test1-alexey/fs/namei.c 2003-09-14 18:15:11.000000000 +0400
@@ -263,8 +263,19 @@ int deny_write_access(struct file * file
return 0;
}
inode = nd->dentry->d_inode;
/* fallthrough */
case 1:
-+ nd->flags |= LOOKUP_LAST;
-+ err = revalidate_special(nd);
-+ nd->flags &= ~LOOKUP_LAST;
-+ if (err)
-+ break;
- goto return_base;
++ nd->flags |= LOOKUP_LAST;
++ err = revalidate_special(nd);
++ nd->flags &= ~LOOKUP_LAST;
++ if (err)
++ break;
+ goto return_reval;
}
if (nd->dentry->d_op && nd->dentry->d_op->d_hash) {
@@ -700,7 +749,9 @@ last_component:
if (err)
break;
follow_mount(&next.mnt, &next.dentry);
-@@ -912,7 +963,7 @@ struct dentry * lookup_hash(struct qstr
+@@ -926,7 +977,7 @@ struct dentry * lookup_hash(struct qstr
}
/* SMP-safe */
{
unsigned long hash;
struct qstr this;
-@@ -932,11 +983,16 @@ struct dentry * lookup_one_len(const cha
+@@ -946,11 +997,16 @@ struct dentry * lookup_one_len(const cha
}
this.hash = end_name_hash(hash);
/*
* namei()
*
-@@ -948,11 +1004,12 @@ access:
+@@ -962,11 +1018,12 @@ access:
* that namei follows links, while lnamei does not.
* SMP-safe
*/
if (!IS_ERR(tmp)) {
err = path_lookup(tmp, flags, nd);
putname(tmp);
-@@ -960,6 +1017,12 @@ int __user_walk(const char __user *name,
+@@ -974,6 +1031,12 @@ int __user_walk(const char __user *name,
return err;
}
/*
* It's inline, so penalty for filesystems that don't use sticky bit is
* minimal.
-@@ -1232,8 +1295,8 @@ int open_namei(const char * pathname, in
+@@ -1246,8 +1309,8 @@ int open_namei(const char * pathname, in
acc_mode |= MAY_APPEND;
/* Fill in the open() intent data */
/*
* The simplest case - just a plain lookup.
-@@ -1249,6 +1312,7 @@ int open_namei(const char * pathname, in
+@@ -1263,6 +1326,7 @@ int open_namei(const char * pathname, in
/*
* Create - we need to know the parent.
*/
error = path_lookup(pathname, LOOKUP_PARENT|LOOKUP_OPEN|LOOKUP_CREATE, nd);
if (error)
return error;
-@@ -1265,7 +1329,9 @@ int open_namei(const char * pathname, in
+@@ -1279,7 +1343,9 @@ int open_namei(const char * pathname, in
dir = nd->dentry;
nd->flags &= ~LOOKUP_PARENT;
down(&dir->d_inode->i_sem);
do_last:
error = PTR_ERR(dentry);
-@@ -1370,7 +1436,9 @@ do_link:
+@@ -1384,7 +1450,9 @@ do_link:
}
dir = nd->dentry;
down(&dir->d_inode->i_sem);
putname(nd->last.name);
goto do_last;
}
-@@ -2143,7 +2211,9 @@ static inline int
+@@ -2142,7 +2210,9 @@ static inline int
__vfs_follow_link(struct nameidata *nd, const char *link)
{
int res = 0;
if (IS_ERR(link))
goto fail;
-@@ -2153,6 +2223,10 @@ __vfs_follow_link(struct nameidata *nd,
+@@ -2152,6 +2222,10 @@ __vfs_follow_link(struct nameidata *nd,
/* weird __emul_prefix() stuff did it */
goto out;
}
res = link_path_walk(link, nd);
out:
if (current->link_count || res || nd->last_type!=LAST_NORM)
---- linux-2.6.0-test1/fs/namespace.c~vfs_intent_2.6.0-test1 2003-09-13 16:01:21.000000000 +0400
-+++ linux-2.6.0-test1-alexey/fs/namespace.c 2003-09-13 16:21:05.000000000 +0400
+--- linux-2.6.0-test1/fs/namespace.c~vfs_intent_2.6.0-test1 2003-09-13 19:07:44.000000000 +0400
++++ linux-2.6.0-test1-alexey/fs/namespace.c 2003-09-14 18:13:44.000000000 +0400
@@ -738,6 +738,7 @@ long do_mount(char * dev_name, char * di
int retval = 0;
int mnt_flags = 0;
static void chroot_fs_refs(struct nameidata *old_nd, struct nameidata *new_nd)
{
---- linux-2.6.0-test1/fs/open.c~vfs_intent_2.6.0-test1 2003-07-24 15:52:47.000000000 +0400
-+++ linux-2.6.0-test1-alexey/fs/open.c 2003-09-13 16:21:05.000000000 +0400
+--- linux-2.6.0-test1/fs/open.c~vfs_intent_2.6.0-test1 2003-09-13 19:08:34.000000000 +0400
++++ linux-2.6.0-test1-alexey/fs/open.c 2003-09-14 18:13:44.000000000 +0400
@@ -200,7 +200,7 @@ static inline long do_sys_truncate(const
struct nameidata nd;
struct inode * inode;
/*
* Find an empty file descriptor entry, and mark it busy.
*/
---- linux-2.6.0-test1/fs/stat.c~vfs_intent_2.6.0-test1 2003-09-13 16:01:21.000000000 +0400
-+++ linux-2.6.0-test1-alexey/fs/stat.c 2003-09-13 16:21:05.000000000 +0400
+--- linux-2.6.0-test1/fs/stat.c~vfs_intent_2.6.0-test1 2003-09-13 19:08:11.000000000 +0400
++++ linux-2.6.0-test1-alexey/fs/stat.c 2003-09-14 18:13:44.000000000 +0400
@@ -33,7 +33,7 @@ void generic_fillattr(struct inode *inod
stat->blksize = inode->i_blksize;
}
fput(f);
}
return error;
---- linux-2.6.0-test1/include/linux/dcache.h~vfs_intent_2.6.0-test1 2003-07-24 15:52:31.000000000 +0400
-+++ linux-2.6.0-test1-alexey/include/linux/dcache.h 2003-09-13 16:21:05.000000000 +0400
+--- linux-2.6.0-test1/include/linux/dcache.h~vfs_intent_2.6.0-test1 2003-09-13 19:08:13.000000000 +0400
++++ linux-2.6.0-test1-alexey/include/linux/dcache.h 2003-09-14 18:13:44.000000000 +0400
@@ -4,6 +4,7 @@
#ifdef __KERNEL__
struct dentry_stat_t {
int nr_dentry;
int nr_unused;
---- linux-2.6.0-test1/include/linux/fs.h~vfs_intent_2.6.0-test1 2003-09-13 16:01:21.000000000 +0400
-+++ linux-2.6.0-test1-alexey/include/linux/fs.h 2003-09-13 16:21:05.000000000 +0400
-@@ -237,6 +237,8 @@ typedef int (get_blocks_t)(struct inode
+--- linux-2.6.0-test1/include/linux/fs.h~vfs_intent_2.6.0-test1 2003-09-13 19:08:41.000000000 +0400
++++ linux-2.6.0-test1-alexey/include/linux/fs.h 2003-09-14 18:13:44.000000000 +0400
+@@ -240,6 +240,8 @@ typedef void (dio_iodone_t)(struct inode
#define ATTR_ATTR_FLAG 1024
#define ATTR_KILL_SUID 2048
#define ATTR_KILL_SGID 4096
/*
* This is the Inode Attributes structure, used for notify_change(). It
-@@ -396,6 +398,7 @@ struct inode {
+@@ -399,6 +401,7 @@ struct inode {
struct block_device *i_bdev;
struct cdev *i_cdev;
int i_cindex;
unsigned long i_dnotify_mask; /* Directory notify events */
struct dnotify_struct *i_dnotify; /* for directory notifications */
-@@ -511,6 +514,7 @@ struct file {
+@@ -514,6 +517,7 @@ struct file {
/* Used by fs/eventpoll.c to link all the hooks to this file */
struct list_head f_ep_links;
spinlock_t f_ep_lock;
};
extern spinlock_t files_lock;
#define file_list_lock() spin_lock(&files_lock);
-@@ -816,7 +820,9 @@ struct inode_operations {
+@@ -814,7 +818,9 @@ struct inode_operations {
void (*truncate) (struct inode *);
int (*permission) (struct inode *, int, struct nameidata *);
int (*setattr) (struct dentry *, struct iattr *);
int (*setxattr) (struct dentry *, const char *,const void *,size_t,int);
ssize_t (*getxattr) (struct dentry *, const char *, void *, size_t);
ssize_t (*listxattr) (struct dentry *, char *, size_t);
-@@ -1029,6 +1035,7 @@ extern int register_filesystem(struct fi
+@@ -1027,6 +1033,7 @@ extern int register_filesystem(struct fi
extern int unregister_filesystem(struct file_system_type *);
extern struct vfsmount *kern_mount(struct file_system_type *);
extern int may_umount(struct vfsmount *);
extern long do_mount(char *, char *, char *, unsigned long, void *);
extern int vfs_statfs(struct super_block *, struct kstatfs *);
-@@ -1096,6 +1103,7 @@ extern int do_truncate(struct dentry *,
+@@ -1094,6 +1101,7 @@ extern int do_truncate(struct dentry *,
extern struct file *filp_open(const char *, int, int);
extern struct file * dentry_open(struct dentry *, struct vfsmount *, int);
extern char * getname(const char __user *);
--- linux-2.6.0-test1/include/linux/namei.h~vfs_intent_2.6.0-test1 2003-07-24 15:52:31.000000000 +0400
-+++ linux-2.6.0-test1-alexey/include/linux/namei.h 2003-09-13 16:21:05.000000000 +0400
++++ linux-2.6.0-test1-alexey/include/linux/namei.h 2003-09-14 18:13:44.000000000 +0400
@@ -2,25 +2,55 @@
#define _LINUX_NAMEI_H
extern int follow_down(struct vfsmount **, struct dentry **);
extern int follow_up(struct vfsmount **, struct dentry **);
---- linux-2.6.0-test1/kernel/ksyms.c~vfs_intent_2.6.0-test1 2003-09-13 16:01:33.000000000 +0400
-+++ linux-2.6.0-test1-alexey/kernel/ksyms.c 2003-09-13 16:21:05.000000000 +0400
-@@ -383,6 +383,7 @@ EXPORT_SYMBOL(unregister_filesystem);
+--- linux-2.6.0-test1/kernel/ksyms.c~vfs_intent_2.6.0-test1 2003-09-13 19:08:42.000000000 +0400
++++ linux-2.6.0-test1-alexey/kernel/ksyms.c 2003-09-14 18:13:44.000000000 +0400
+@@ -382,6 +382,7 @@ EXPORT_SYMBOL(unregister_filesystem);
EXPORT_SYMBOL(kern_mount);
EXPORT_SYMBOL(__mntput);
EXPORT_SYMBOL(may_umount);
/* executable format registration */
EXPORT_SYMBOL(register_binfmt);
-@@ -412,6 +413,12 @@ EXPORT_SYMBOL(del_timer);
+@@ -409,6 +410,12 @@ EXPORT_SYMBOL(proc_doulongvec_minmax);
EXPORT_SYMBOL(request_irq);
EXPORT_SYMBOL(free_irq);
/* waitqueue handling */
EXPORT_SYMBOL(add_wait_queue);
EXPORT_SYMBOL(add_wait_queue_exclusive);
-@@ -559,6 +566,7 @@ EXPORT_SYMBOL(sys_tz);
+@@ -558,6 +565,7 @@ EXPORT_SYMBOL(sys_tz);
EXPORT_SYMBOL(file_fsync);
EXPORT_SYMBOL(fsync_buffers_list);
EXPORT_SYMBOL(clear_inode);
EXPORT_SYMBOL(init_special_inode);
EXPORT_SYMBOL(new_inode);
EXPORT_SYMBOL(__insert_inode_hash);
---- linux-2.6.0-test1/fs/nfs/dir.c~vfs_intent_2.6.0-test1 2003-07-24 15:52:31.000000000 +0400
-+++ linux-2.6.0-test1-alexey/fs/nfs/dir.c 2003-09-13 16:21:05.000000000 +0400
-@@ -650,7 +650,7 @@ int nfs_is_exclusive_create(struct inode
+--- linux-2.6.0-test1/fs/nfs/dir.c~vfs_intent_2.6.0-test1 2003-09-13 19:08:34.000000000 +0400
++++ linux-2.6.0-test1-alexey/fs/nfs/dir.c 2003-09-14 18:13:44.000000000 +0400
+@@ -652,7 +652,7 @@ int nfs_is_exclusive_create(struct inode
return 0;
if (!nd || (nd->flags & LOOKUP_CONTINUE) || !(nd->flags & LOOKUP_CREATE))
return 0;
}
static struct dentry *nfs_lookup(struct inode *dir, struct dentry * dentry, struct nameidata *nd)
-@@ -830,7 +830,7 @@ static int nfs_create(struct inode *dir,
+@@ -825,7 +825,7 @@ static int nfs_create(struct inode *dir,
attr.ia_valid = ATTR_MODE;
if (nd && (nd->flags & LOOKUP_CREATE))