aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2011-10-19 08:14:35 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2011-10-19 08:17:16 +0000
commitd451866fd59af0b3c653dd94c0ee135b1e2d9ece (patch)
tree44c2462db7f0d0873f6367cd1d6a106840e30757
parenta83f8406e1450c7f636548c43b9e2ed842c6d872 (diff)
downloadalpine_aports-d451866fd59af0b3c653dd94c0ee135b1e2d9ece.tar.bz2
alpine_aports-d451866fd59af0b3c653dd94c0ee135b1e2d9ece.tar.xz
alpine_aports-d451866fd59af0b3c653dd94c0ee135b1e2d9ece.zip
main/grsecurity: upgrade to grsecurity-2.2.2-3.0.7-201110180733
-rw-r--r--main/linux-grsec/APKBUILD4
-rw-r--r--main/linux-grsec/grsecurity-2.2.2-3.0.7-201110180733.patch (renamed from main/linux-grsec/grsecurity-2.2.2-3.0.7-201110172337.patch)85
2 files changed, 43 insertions, 46 deletions
diff --git a/main/linux-grsec/APKBUILD b/main/linux-grsec/APKBUILD
index ef4faefea5..dd4096534f 100644
--- a/main/linux-grsec/APKBUILD
+++ b/main/linux-grsec/APKBUILD
@@ -14,7 +14,7 @@ _config=${config:-kernelconfig.${CARCH}}
14install= 14install=
15source="ftp://ftp.kernel.org/pub/linux/kernel/v3.0/linux-$_kernver.tar.bz2 15source="ftp://ftp.kernel.org/pub/linux/kernel/v3.0/linux-$_kernver.tar.bz2
16 ftp://ftp.kernel.org/pub/linux/kernel/v3.0/patch-$pkgver.bz2 16 ftp://ftp.kernel.org/pub/linux/kernel/v3.0/patch-$pkgver.bz2
17 grsecurity-2.2.2-3.0.7-201110172337.patch 17 grsecurity-2.2.2-3.0.7-201110180733.patch
18 grsec-timblogiw-noconst.patch 18 grsec-timblogiw-noconst.patch
19 19
20 0004-arp-flush-arp-cache-on-device-change.patch 20 0004-arp-flush-arp-cache-on-device-change.patch
@@ -139,7 +139,7 @@ dev() {
139 139
140md5sums="398e95866794def22b12dfbc15ce89c0 linux-3.0.tar.bz2 140md5sums="398e95866794def22b12dfbc15ce89c0 linux-3.0.tar.bz2
141451412dc3b25c60fed80ddd5c49cb855 patch-3.0.7.bz2 141451412dc3b25c60fed80ddd5c49cb855 patch-3.0.7.bz2
14269b5cb7d7fa679346a6752d8759fa945 grsecurity-2.2.2-3.0.7-201110172337.patch 142b00632cd15f00e799660ed72a64f15ed grsecurity-2.2.2-3.0.7-201110180733.patch
143c41cf0ee9794f393423c6b2093072260 grsec-timblogiw-noconst.patch 143c41cf0ee9794f393423c6b2093072260 grsec-timblogiw-noconst.patch
144776adeeb5272093574f8836c5037dd7d 0004-arp-flush-arp-cache-on-device-change.patch 144776adeeb5272093574f8836c5037dd7d 0004-arp-flush-arp-cache-on-device-change.patch
145bcb5aaabe38627ec887406774d8aeb42 kernelconfig.x86 145bcb5aaabe38627ec887406774d8aeb42 kernelconfig.x86
diff --git a/main/linux-grsec/grsecurity-2.2.2-3.0.7-201110172337.patch b/main/linux-grsec/grsecurity-2.2.2-3.0.7-201110180733.patch
index 0fc7b864ec..d5f08b1e53 100644
--- a/main/linux-grsec/grsecurity-2.2.2-3.0.7-201110172337.patch
+++ b/main/linux-grsec/grsecurity-2.2.2-3.0.7-201110180733.patch
@@ -43686,8 +43686,8 @@ diff -urNp linux-3.0.7/fs/logfs/super.c linux-3.0.7/fs/logfs/super.c
43686 if (err) 43686 if (err)
43687diff -urNp linux-3.0.7/fs/namei.c linux-3.0.7/fs/namei.c 43687diff -urNp linux-3.0.7/fs/namei.c linux-3.0.7/fs/namei.c
43688--- linux-3.0.7/fs/namei.c 2011-10-16 21:54:54.000000000 -0400 43688--- linux-3.0.7/fs/namei.c 2011-10-16 21:54:54.000000000 -0400
43689+++ linux-3.0.7/fs/namei.c 2011-10-16 21:55:28.000000000 -0400 43689+++ linux-3.0.7/fs/namei.c 2011-10-18 06:55:15.000000000 -0400
43690@@ -237,21 +237,31 @@ int generic_permission(struct inode *ino 43690@@ -237,21 +237,23 @@ int generic_permission(struct inode *ino
43691 return ret; 43691 return ret;
43692 43692
43693 /* 43693 /*
@@ -43700,10 +43700,6 @@ diff -urNp linux-3.0.7/fs/namei.c linux-3.0.7/fs/namei.c
43700- if (ns_capable(inode_userns(inode), CAP_DAC_OVERRIDE)) 43700- if (ns_capable(inode_userns(inode), CAP_DAC_OVERRIDE))
43701+ mask &= MAY_READ | MAY_WRITE | MAY_EXEC; 43701+ mask &= MAY_READ | MAY_WRITE | MAY_EXEC;
43702+ if (mask == MAY_READ || (S_ISDIR(inode->i_mode) && !(mask & MAY_WRITE))) { 43702+ if (mask == MAY_READ || (S_ISDIR(inode->i_mode) && !(mask & MAY_WRITE))) {
43703+#ifdef CONFIG_GRKERNSEC
43704+ if (flags & IPERM_FLAG_RCU)
43705+ return -ECHILD;
43706+#endif
43707+ if (ns_capable(inode_userns(inode), CAP_DAC_READ_SEARCH)) 43703+ if (ns_capable(inode_userns(inode), CAP_DAC_READ_SEARCH))
43708 return 0; 43704 return 0;
43709+ } 43705+ }
@@ -43718,17 +43714,13 @@ diff -urNp linux-3.0.7/fs/namei.c linux-3.0.7/fs/namei.c
43718- if (mask == MAY_READ || (S_ISDIR(inode->i_mode) && !(mask & MAY_WRITE))) 43714- if (mask == MAY_READ || (S_ISDIR(inode->i_mode) && !(mask & MAY_WRITE)))
43719- if (ns_capable(inode_userns(inode), CAP_DAC_READ_SEARCH)) 43715- if (ns_capable(inode_userns(inode), CAP_DAC_READ_SEARCH))
43720+ if (!(mask & MAY_EXEC) || execute_ok(inode)) { 43716+ if (!(mask & MAY_EXEC) || execute_ok(inode)) {
43721+#ifdef CONFIG_GRKERNSEC
43722+ if (flags & IPERM_FLAG_RCU)
43723+ return -ECHILD;
43724+#endif
43725+ if (ns_capable(inode_userns(inode), CAP_DAC_OVERRIDE)) 43717+ if (ns_capable(inode_userns(inode), CAP_DAC_OVERRIDE))
43726 return 0; 43718 return 0;
43727+ } 43719+ }
43728 43720
43729 return -EACCES; 43721 return -EACCES;
43730 } 43722 }
43731@@ -547,6 +557,9 @@ static int complete_walk(struct nameidat 43723@@ -547,6 +549,9 @@ static int complete_walk(struct nameidat
43732 br_read_unlock(vfsmount_lock); 43724 br_read_unlock(vfsmount_lock);
43733 } 43725 }
43734 43726
@@ -43738,7 +43730,7 @@ diff -urNp linux-3.0.7/fs/namei.c linux-3.0.7/fs/namei.c
43738 if (likely(!(nd->flags & LOOKUP_JUMPED))) 43730 if (likely(!(nd->flags & LOOKUP_JUMPED)))
43739 return 0; 43731 return 0;
43740 43732
43741@@ -593,9 +606,16 @@ static inline int exec_permission(struct 43733@@ -593,9 +598,12 @@ static inline int exec_permission(struct
43742 if (ret == -ECHILD) 43734 if (ret == -ECHILD)
43743 return ret; 43735 return ret;
43744 43736
@@ -43747,17 +43739,13 @@ diff -urNp linux-3.0.7/fs/namei.c linux-3.0.7/fs/namei.c
43747+ if (ns_capable_nolog(ns, CAP_DAC_OVERRIDE)) 43739+ if (ns_capable_nolog(ns, CAP_DAC_OVERRIDE))
43748 goto ok; 43740 goto ok;
43749+ else { 43741+ else {
43750+#ifdef CONFIG_GRKERNSEC
43751+ if (flags & IPERM_FLAG_RCU)
43752+ return -ECHILD;
43753+#endif
43754+ if (ns_capable(ns, CAP_DAC_READ_SEARCH) || ns_capable(ns, CAP_DAC_OVERRIDE)) 43742+ if (ns_capable(ns, CAP_DAC_READ_SEARCH) || ns_capable(ns, CAP_DAC_OVERRIDE))
43755+ goto ok; 43743+ goto ok;
43756+ } 43744+ }
43757 43745
43758 return ret; 43746 return ret;
43759 ok: 43747 ok:
43760@@ -703,11 +723,26 @@ follow_link(struct path *link, struct na 43748@@ -703,11 +711,26 @@ follow_link(struct path *link, struct na
43761 return error; 43749 return error;
43762 } 43750 }
43763 43751
@@ -43785,7 +43773,7 @@ diff -urNp linux-3.0.7/fs/namei.c linux-3.0.7/fs/namei.c
43785 error = 0; 43773 error = 0;
43786 if (s) 43774 if (s)
43787 error = __vfs_follow_link(nd, s); 43775 error = __vfs_follow_link(nd, s);
43788@@ -1625,6 +1660,9 @@ static int do_path_lookup(int dfd, const 43776@@ -1625,6 +1648,9 @@ static int do_path_lookup(int dfd, const
43789 retval = path_lookupat(dfd, name, flags | LOOKUP_REVAL, nd); 43777 retval = path_lookupat(dfd, name, flags | LOOKUP_REVAL, nd);
43790 43778
43791 if (likely(!retval)) { 43779 if (likely(!retval)) {
@@ -43795,7 +43783,7 @@ diff -urNp linux-3.0.7/fs/namei.c linux-3.0.7/fs/namei.c
43795 if (unlikely(!audit_dummy_context())) { 43783 if (unlikely(!audit_dummy_context())) {
43796 if (nd->path.dentry && nd->inode) 43784 if (nd->path.dentry && nd->inode)
43797 audit_inode(name, nd->path.dentry); 43785 audit_inode(name, nd->path.dentry);
43798@@ -1935,6 +1973,30 @@ int vfs_create(struct inode *dir, struct 43786@@ -1935,6 +1961,30 @@ int vfs_create(struct inode *dir, struct
43799 return error; 43787 return error;
43800 } 43788 }
43801 43789
@@ -43826,7 +43814,7 @@ diff -urNp linux-3.0.7/fs/namei.c linux-3.0.7/fs/namei.c
43826 static int may_open(struct path *path, int acc_mode, int flag) 43814 static int may_open(struct path *path, int acc_mode, int flag)
43827 { 43815 {
43828 struct dentry *dentry = path->dentry; 43816 struct dentry *dentry = path->dentry;
43829@@ -1987,7 +2049,27 @@ static int may_open(struct path *path, i 43817@@ -1987,7 +2037,27 @@ static int may_open(struct path *path, i
43830 /* 43818 /*
43831 * Ensure there are no outstanding leases on the file. 43819 * Ensure there are no outstanding leases on the file.
43832 */ 43820 */
@@ -43855,7 +43843,7 @@ diff -urNp linux-3.0.7/fs/namei.c linux-3.0.7/fs/namei.c
43855 } 43843 }
43856 43844
43857 static int handle_truncate(struct file *filp) 43845 static int handle_truncate(struct file *filp)
43858@@ -2013,30 +2095,6 @@ static int handle_truncate(struct file * 43846@@ -2013,30 +2083,6 @@ static int handle_truncate(struct file *
43859 } 43847 }
43860 43848
43861 /* 43849 /*
@@ -43886,7 +43874,7 @@ diff -urNp linux-3.0.7/fs/namei.c linux-3.0.7/fs/namei.c
43886 * Handle the last step of open() 43874 * Handle the last step of open()
43887 */ 43875 */
43888 static struct file *do_last(struct nameidata *nd, struct path *path, 43876 static struct file *do_last(struct nameidata *nd, struct path *path,
43889@@ -2045,6 +2103,7 @@ static struct file *do_last(struct namei 43877@@ -2045,6 +2091,7 @@ static struct file *do_last(struct namei
43890 struct dentry *dir = nd->path.dentry; 43878 struct dentry *dir = nd->path.dentry;
43891 struct dentry *dentry; 43879 struct dentry *dentry;
43892 int open_flag = op->open_flag; 43880 int open_flag = op->open_flag;
@@ -43894,7 +43882,16 @@ diff -urNp linux-3.0.7/fs/namei.c linux-3.0.7/fs/namei.c
43894 int will_truncate = open_flag & O_TRUNC; 43882 int will_truncate = open_flag & O_TRUNC;
43895 int want_write = 0; 43883 int want_write = 0;
43896 int acc_mode = op->acc_mode; 43884 int acc_mode = op->acc_mode;
43897@@ -2132,6 +2191,12 @@ static struct file *do_last(struct namei 43885@@ -2095,7 +2142,7 @@ static struct file *do_last(struct namei
43886 /* sayonara */
43887 error = complete_walk(nd);
43888 if (error)
43889- return ERR_PTR(-ECHILD);
43890+ return ERR_PTR(error);
43891
43892 error = -ENOTDIR;
43893 if (nd->flags & LOOKUP_DIRECTORY) {
43894@@ -2132,6 +2179,12 @@ static struct file *do_last(struct namei
43898 /* Negative dentry, just create the file */ 43895 /* Negative dentry, just create the file */
43899 if (!dentry->d_inode) { 43896 if (!dentry->d_inode) {
43900 int mode = op->mode; 43897 int mode = op->mode;
@@ -43907,7 +43904,7 @@ diff -urNp linux-3.0.7/fs/namei.c linux-3.0.7/fs/namei.c
43907 if (!IS_POSIXACL(dir->d_inode)) 43904 if (!IS_POSIXACL(dir->d_inode))
43908 mode &= ~current_umask(); 43905 mode &= ~current_umask();
43909 /* 43906 /*
43910@@ -2155,6 +2220,8 @@ static struct file *do_last(struct namei 43907@@ -2155,6 +2208,8 @@ static struct file *do_last(struct namei
43911 error = vfs_create(dir->d_inode, dentry, mode, nd); 43908 error = vfs_create(dir->d_inode, dentry, mode, nd);
43912 if (error) 43909 if (error)
43913 goto exit_mutex_unlock; 43910 goto exit_mutex_unlock;
@@ -43916,7 +43913,7 @@ diff -urNp linux-3.0.7/fs/namei.c linux-3.0.7/fs/namei.c
43916 mutex_unlock(&dir->d_inode->i_mutex); 43913 mutex_unlock(&dir->d_inode->i_mutex);
43917 dput(nd->path.dentry); 43914 dput(nd->path.dentry);
43918 nd->path.dentry = dentry; 43915 nd->path.dentry = dentry;
43919@@ -2164,6 +2231,14 @@ static struct file *do_last(struct namei 43916@@ -2164,6 +2219,14 @@ static struct file *do_last(struct namei
43920 /* 43917 /*
43921 * It already exists. 43918 * It already exists.
43922 */ 43919 */
@@ -43931,7 +43928,7 @@ diff -urNp linux-3.0.7/fs/namei.c linux-3.0.7/fs/namei.c
43931 mutex_unlock(&dir->d_inode->i_mutex); 43928 mutex_unlock(&dir->d_inode->i_mutex);
43932 audit_inode(pathname, path->dentry); 43929 audit_inode(pathname, path->dentry);
43933 43930
43934@@ -2450,6 +2525,17 @@ SYSCALL_DEFINE4(mknodat, int, dfd, const 43931@@ -2450,6 +2513,17 @@ SYSCALL_DEFINE4(mknodat, int, dfd, const
43935 error = may_mknod(mode); 43932 error = may_mknod(mode);
43936 if (error) 43933 if (error)
43937 goto out_dput; 43934 goto out_dput;
@@ -43949,7 +43946,7 @@ diff -urNp linux-3.0.7/fs/namei.c linux-3.0.7/fs/namei.c
43949 error = mnt_want_write(nd.path.mnt); 43946 error = mnt_want_write(nd.path.mnt);
43950 if (error) 43947 if (error)
43951 goto out_dput; 43948 goto out_dput;
43952@@ -2470,6 +2556,9 @@ SYSCALL_DEFINE4(mknodat, int, dfd, const 43949@@ -2470,6 +2544,9 @@ SYSCALL_DEFINE4(mknodat, int, dfd, const
43953 } 43950 }
43954 out_drop_write: 43951 out_drop_write:
43955 mnt_drop_write(nd.path.mnt); 43952 mnt_drop_write(nd.path.mnt);
@@ -43959,7 +43956,7 @@ diff -urNp linux-3.0.7/fs/namei.c linux-3.0.7/fs/namei.c
43959 out_dput: 43956 out_dput:
43960 dput(dentry); 43957 dput(dentry);
43961 out_unlock: 43958 out_unlock:
43962@@ -2522,6 +2611,11 @@ SYSCALL_DEFINE3(mkdirat, int, dfd, const 43959@@ -2522,6 +2599,11 @@ SYSCALL_DEFINE3(mkdirat, int, dfd, const
43963 if (IS_ERR(dentry)) 43960 if (IS_ERR(dentry))
43964 goto out_unlock; 43961 goto out_unlock;
43965 43962
@@ -43971,7 +43968,7 @@ diff -urNp linux-3.0.7/fs/namei.c linux-3.0.7/fs/namei.c
43971 if (!IS_POSIXACL(nd.path.dentry->d_inode)) 43968 if (!IS_POSIXACL(nd.path.dentry->d_inode))
43972 mode &= ~current_umask(); 43969 mode &= ~current_umask();
43973 error = mnt_want_write(nd.path.mnt); 43970 error = mnt_want_write(nd.path.mnt);
43974@@ -2533,6 +2627,10 @@ SYSCALL_DEFINE3(mkdirat, int, dfd, const 43971@@ -2533,6 +2615,10 @@ SYSCALL_DEFINE3(mkdirat, int, dfd, const
43975 error = vfs_mkdir(nd.path.dentry->d_inode, dentry, mode); 43972 error = vfs_mkdir(nd.path.dentry->d_inode, dentry, mode);
43976 out_drop_write: 43973 out_drop_write:
43977 mnt_drop_write(nd.path.mnt); 43974 mnt_drop_write(nd.path.mnt);
@@ -43982,7 +43979,7 @@ diff -urNp linux-3.0.7/fs/namei.c linux-3.0.7/fs/namei.c
43982 out_dput: 43979 out_dput:
43983 dput(dentry); 43980 dput(dentry);
43984 out_unlock: 43981 out_unlock:
43985@@ -2615,6 +2713,8 @@ static long do_rmdir(int dfd, const char 43982@@ -2615,6 +2701,8 @@ static long do_rmdir(int dfd, const char
43986 char * name; 43983 char * name;
43987 struct dentry *dentry; 43984 struct dentry *dentry;
43988 struct nameidata nd; 43985 struct nameidata nd;
@@ -43991,7 +43988,7 @@ diff -urNp linux-3.0.7/fs/namei.c linux-3.0.7/fs/namei.c
43991 43988
43992 error = user_path_parent(dfd, pathname, &nd, &name); 43989 error = user_path_parent(dfd, pathname, &nd, &name);
43993 if (error) 43990 if (error)
43994@@ -2643,6 +2743,17 @@ static long do_rmdir(int dfd, const char 43991@@ -2643,6 +2731,17 @@ static long do_rmdir(int dfd, const char
43995 error = -ENOENT; 43992 error = -ENOENT;
43996 goto exit3; 43993 goto exit3;
43997 } 43994 }
@@ -44009,7 +44006,7 @@ diff -urNp linux-3.0.7/fs/namei.c linux-3.0.7/fs/namei.c
44009 error = mnt_want_write(nd.path.mnt); 44006 error = mnt_want_write(nd.path.mnt);
44010 if (error) 44007 if (error)
44011 goto exit3; 44008 goto exit3;
44012@@ -2650,6 +2761,8 @@ static long do_rmdir(int dfd, const char 44009@@ -2650,6 +2749,8 @@ static long do_rmdir(int dfd, const char
44013 if (error) 44010 if (error)
44014 goto exit4; 44011 goto exit4;
44015 error = vfs_rmdir(nd.path.dentry->d_inode, dentry); 44012 error = vfs_rmdir(nd.path.dentry->d_inode, dentry);
@@ -44018,7 +44015,7 @@ diff -urNp linux-3.0.7/fs/namei.c linux-3.0.7/fs/namei.c
44018 exit4: 44015 exit4:
44019 mnt_drop_write(nd.path.mnt); 44016 mnt_drop_write(nd.path.mnt);
44020 exit3: 44017 exit3:
44021@@ -2712,6 +2825,8 @@ static long do_unlinkat(int dfd, const c 44018@@ -2712,6 +2813,8 @@ static long do_unlinkat(int dfd, const c
44022 struct dentry *dentry; 44019 struct dentry *dentry;
44023 struct nameidata nd; 44020 struct nameidata nd;
44024 struct inode *inode = NULL; 44021 struct inode *inode = NULL;
@@ -44027,7 +44024,7 @@ diff -urNp linux-3.0.7/fs/namei.c linux-3.0.7/fs/namei.c
44027 44024
44028 error = user_path_parent(dfd, pathname, &nd, &name); 44025 error = user_path_parent(dfd, pathname, &nd, &name);
44029 if (error) 44026 if (error)
44030@@ -2734,6 +2849,16 @@ static long do_unlinkat(int dfd, const c 44027@@ -2734,6 +2837,16 @@ static long do_unlinkat(int dfd, const c
44031 if (!inode) 44028 if (!inode)
44032 goto slashes; 44029 goto slashes;
44033 ihold(inode); 44030 ihold(inode);
@@ -44044,7 +44041,7 @@ diff -urNp linux-3.0.7/fs/namei.c linux-3.0.7/fs/namei.c
44044 error = mnt_want_write(nd.path.mnt); 44041 error = mnt_want_write(nd.path.mnt);
44045 if (error) 44042 if (error)
44046 goto exit2; 44043 goto exit2;
44047@@ -2741,6 +2866,8 @@ static long do_unlinkat(int dfd, const c 44044@@ -2741,6 +2854,8 @@ static long do_unlinkat(int dfd, const c
44048 if (error) 44045 if (error)
44049 goto exit3; 44046 goto exit3;
44050 error = vfs_unlink(nd.path.dentry->d_inode, dentry); 44047 error = vfs_unlink(nd.path.dentry->d_inode, dentry);
@@ -44053,7 +44050,7 @@ diff -urNp linux-3.0.7/fs/namei.c linux-3.0.7/fs/namei.c
44053 exit3: 44050 exit3:
44054 mnt_drop_write(nd.path.mnt); 44051 mnt_drop_write(nd.path.mnt);
44055 exit2: 44052 exit2:
44056@@ -2818,6 +2945,11 @@ SYSCALL_DEFINE3(symlinkat, const char __ 44053@@ -2818,6 +2933,11 @@ SYSCALL_DEFINE3(symlinkat, const char __
44057 if (IS_ERR(dentry)) 44054 if (IS_ERR(dentry))
44058 goto out_unlock; 44055 goto out_unlock;
44059 44056
@@ -44065,7 +44062,7 @@ diff -urNp linux-3.0.7/fs/namei.c linux-3.0.7/fs/namei.c
44065 error = mnt_want_write(nd.path.mnt); 44062 error = mnt_want_write(nd.path.mnt);
44066 if (error) 44063 if (error)
44067 goto out_dput; 44064 goto out_dput;
44068@@ -2825,6 +2957,8 @@ SYSCALL_DEFINE3(symlinkat, const char __ 44065@@ -2825,6 +2945,8 @@ SYSCALL_DEFINE3(symlinkat, const char __
44069 if (error) 44066 if (error)
44070 goto out_drop_write; 44067 goto out_drop_write;
44071 error = vfs_symlink(nd.path.dentry->d_inode, dentry, from); 44068 error = vfs_symlink(nd.path.dentry->d_inode, dentry, from);
@@ -44074,7 +44071,7 @@ diff -urNp linux-3.0.7/fs/namei.c linux-3.0.7/fs/namei.c
44074 out_drop_write: 44071 out_drop_write:
44075 mnt_drop_write(nd.path.mnt); 44072 mnt_drop_write(nd.path.mnt);
44076 out_dput: 44073 out_dput:
44077@@ -2933,6 +3067,20 @@ SYSCALL_DEFINE5(linkat, int, olddfd, con 44074@@ -2933,6 +3055,20 @@ SYSCALL_DEFINE5(linkat, int, olddfd, con
44078 error = PTR_ERR(new_dentry); 44075 error = PTR_ERR(new_dentry);
44079 if (IS_ERR(new_dentry)) 44076 if (IS_ERR(new_dentry))
44080 goto out_unlock; 44077 goto out_unlock;
@@ -44095,7 +44092,7 @@ diff -urNp linux-3.0.7/fs/namei.c linux-3.0.7/fs/namei.c
44095 error = mnt_want_write(nd.path.mnt); 44092 error = mnt_want_write(nd.path.mnt);
44096 if (error) 44093 if (error)
44097 goto out_dput; 44094 goto out_dput;
44098@@ -2940,6 +3088,8 @@ SYSCALL_DEFINE5(linkat, int, olddfd, con 44095@@ -2940,6 +3076,8 @@ SYSCALL_DEFINE5(linkat, int, olddfd, con
44099 if (error) 44096 if (error)
44100 goto out_drop_write; 44097 goto out_drop_write;
44101 error = vfs_link(old_path.dentry, nd.path.dentry->d_inode, new_dentry); 44098 error = vfs_link(old_path.dentry, nd.path.dentry->d_inode, new_dentry);
@@ -44104,7 +44101,7 @@ diff -urNp linux-3.0.7/fs/namei.c linux-3.0.7/fs/namei.c
44104 out_drop_write: 44101 out_drop_write:
44105 mnt_drop_write(nd.path.mnt); 44102 mnt_drop_write(nd.path.mnt);
44106 out_dput: 44103 out_dput:
44107@@ -3117,6 +3267,8 @@ SYSCALL_DEFINE4(renameat, int, olddfd, c 44104@@ -3117,6 +3255,8 @@ SYSCALL_DEFINE4(renameat, int, olddfd, c
44108 char *to; 44105 char *to;
44109 int error; 44106 int error;
44110 44107
@@ -44113,7 +44110,7 @@ diff -urNp linux-3.0.7/fs/namei.c linux-3.0.7/fs/namei.c
44113 error = user_path_parent(olddfd, oldname, &oldnd, &from); 44110 error = user_path_parent(olddfd, oldname, &oldnd, &from);
44114 if (error) 44111 if (error)
44115 goto exit; 44112 goto exit;
44116@@ -3173,6 +3325,12 @@ SYSCALL_DEFINE4(renameat, int, olddfd, c 44113@@ -3173,6 +3313,12 @@ SYSCALL_DEFINE4(renameat, int, olddfd, c
44117 if (new_dentry == trap) 44114 if (new_dentry == trap)
44118 goto exit5; 44115 goto exit5;
44119 44116
@@ -44126,7 +44123,7 @@ diff -urNp linux-3.0.7/fs/namei.c linux-3.0.7/fs/namei.c
44126 error = mnt_want_write(oldnd.path.mnt); 44123 error = mnt_want_write(oldnd.path.mnt);
44127 if (error) 44124 if (error)
44128 goto exit5; 44125 goto exit5;
44129@@ -3182,6 +3340,9 @@ SYSCALL_DEFINE4(renameat, int, olddfd, c 44126@@ -3182,6 +3328,9 @@ SYSCALL_DEFINE4(renameat, int, olddfd, c
44130 goto exit6; 44127 goto exit6;
44131 error = vfs_rename(old_dir->d_inode, old_dentry, 44128 error = vfs_rename(old_dir->d_inode, old_dentry,
44132 new_dir->d_inode, new_dentry); 44129 new_dir->d_inode, new_dentry);
@@ -44136,7 +44133,7 @@ diff -urNp linux-3.0.7/fs/namei.c linux-3.0.7/fs/namei.c
44136 exit6: 44133 exit6:
44137 mnt_drop_write(oldnd.path.mnt); 44134 mnt_drop_write(oldnd.path.mnt);
44138 exit5: 44135 exit5:
44139@@ -3207,6 +3368,8 @@ SYSCALL_DEFINE2(rename, const char __use 44136@@ -3207,6 +3356,8 @@ SYSCALL_DEFINE2(rename, const char __use
44140 44137
44141 int vfs_readlink(struct dentry *dentry, char __user *buffer, int buflen, const char *link) 44138 int vfs_readlink(struct dentry *dentry, char __user *buffer, int buflen, const char *link)
44142 { 44139 {
@@ -44145,7 +44142,7 @@ diff -urNp linux-3.0.7/fs/namei.c linux-3.0.7/fs/namei.c
44145 int len; 44142 int len;
44146 44143
44147 len = PTR_ERR(link); 44144 len = PTR_ERR(link);
44148@@ -3216,7 +3379,14 @@ int vfs_readlink(struct dentry *dentry, 44145@@ -3216,7 +3367,14 @@ int vfs_readlink(struct dentry *dentry,
44149 len = strlen(link); 44146 len = strlen(link);
44150 if (len > (unsigned) buflen) 44147 if (len > (unsigned) buflen)
44151 len = buflen; 44148 len = buflen;