aboutsummaryrefslogtreecommitdiffstats
path: root/mm
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2008-07-26 23:23:44 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2008-07-26 23:23:44 -0400
commit4836e3007882984279ca63d3c42bf0b14616eb78 (patch)
tree28bf22726964e068b825491d71a141eefedbe5f8 /mm
parent5c7c204aeca51ccfad63caab4fcdc5d8026c0fd8 (diff)
parent4e1e018ecc6f7bfd10fc75b3ff9715cc8164e0a2 (diff)
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6: (39 commits) [PATCH] fix RLIM_NOFILE handling [PATCH] get rid of corner case in dup3() entirely [PATCH] remove remaining namei_{32,64}.h crap [PATCH] get rid of indirect users of namei.h [PATCH] get rid of __user_path_lookup_open [PATCH] f_count may wrap around [PATCH] dup3 fix [PATCH] don't pass nameidata to __ncp_lookup_validate() [PATCH] don't pass nameidata to gfs2_lookupi() [PATCH] new (local) helper: user_path_parent() [PATCH] sanitize __user_walk_fd() et.al. [PATCH] preparation to __user_walk_fd cleanup [PATCH] kill nameidata passing to permission(), rename to inode_permission() [PATCH] take noexec checks to very few callers that care Re: [PATCH 3/6] vfs: open_exec cleanup [patch 4/4] vfs: immutable inode checking cleanup [patch 3/4] fat: dont call notify_change [patch 2/4] vfs: utimes cleanup [patch 1/4] vfs: utimes: move owner check into inode_change_ok() [PATCH] vfs: use kstrdup() and check failing allocation ...
Diffstat (limited to 'mm')
-rw-r--r--mm/filemap.c7
-rw-r--r--mm/filemap_xip.c2
-rw-r--r--mm/shmem_acl.c2
3 files changed, 6 insertions, 5 deletions
diff --git a/mm/filemap.c b/mm/filemap.c
index 2ed8b0389c51..5de7633e1dbe 100644
--- a/mm/filemap.c
+++ b/mm/filemap.c
@@ -1758,8 +1758,9 @@ static int __remove_suid(struct dentry *dentry, int kill)
1758 return notify_change(dentry, &newattrs); 1758 return notify_change(dentry, &newattrs);
1759} 1759}
1760 1760
1761int remove_suid(struct dentry *dentry) 1761int file_remove_suid(struct file *file)
1762{ 1762{
1763 struct dentry *dentry = file->f_path.dentry;
1763 int killsuid = should_remove_suid(dentry); 1764 int killsuid = should_remove_suid(dentry);
1764 int killpriv = security_inode_need_killpriv(dentry); 1765 int killpriv = security_inode_need_killpriv(dentry);
1765 int error = 0; 1766 int error = 0;
@@ -1773,7 +1774,7 @@ int remove_suid(struct dentry *dentry)
1773 1774
1774 return error; 1775 return error;
1775} 1776}
1776EXPORT_SYMBOL(remove_suid); 1777EXPORT_SYMBOL(file_remove_suid);
1777 1778
1778static size_t __iovec_copy_from_user_inatomic(char *vaddr, 1779static size_t __iovec_copy_from_user_inatomic(char *vaddr,
1779 const struct iovec *iov, size_t base, size_t bytes) 1780 const struct iovec *iov, size_t base, size_t bytes)
@@ -2529,7 +2530,7 @@ __generic_file_aio_write_nolock(struct kiocb *iocb, const struct iovec *iov,
2529 if (count == 0) 2530 if (count == 0)
2530 goto out; 2531 goto out;
2531 2532
2532 err = remove_suid(file->f_path.dentry); 2533 err = file_remove_suid(file);
2533 if (err) 2534 if (err)
2534 goto out; 2535 goto out;
2535 2536
diff --git a/mm/filemap_xip.c b/mm/filemap_xip.c
index 3e744abcce9d..98a3f31ccd6a 100644
--- a/mm/filemap_xip.c
+++ b/mm/filemap_xip.c
@@ -380,7 +380,7 @@ xip_file_write(struct file *filp, const char __user *buf, size_t len,
380 if (count == 0) 380 if (count == 0)
381 goto out_backing; 381 goto out_backing;
382 382
383 ret = remove_suid(filp->f_path.dentry); 383 ret = file_remove_suid(filp);
384 if (ret) 384 if (ret)
385 goto out_backing; 385 goto out_backing;
386 386
diff --git a/mm/shmem_acl.c b/mm/shmem_acl.c
index f5664c5b9eb1..8e5aadd7dcd6 100644
--- a/mm/shmem_acl.c
+++ b/mm/shmem_acl.c
@@ -191,7 +191,7 @@ shmem_check_acl(struct inode *inode, int mask)
191 * shmem_permission - permission() inode operation 191 * shmem_permission - permission() inode operation
192 */ 192 */
193int 193int
194shmem_permission(struct inode *inode, int mask, struct nameidata *nd) 194shmem_permission(struct inode *inode, int mask)
195{ 195{
196 return generic_permission(inode, mask, shmem_check_acl); 196 return generic_permission(inode, mask, shmem_check_acl);
197} 197}