aboutsummaryrefslogtreecommitdiffstats
path: root/fs/namei.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2011-03-23 23:51:42 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2011-03-23 23:51:42 -0400
commitb81a618dcd3ea99de292dbe624f41ca68f464376 (patch)
treec5fbe44f944da9d7dc0c224116be77094d379c8a /fs/namei.c
parent2f284c846331fa44be1300a3c2c3e85800268a00 (diff)
parenta9712bc12c40c172e393f85a9b2ba8db4bf59509 (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: deal with races in /proc/*/{syscall,stack,personality} proc: enable writing to /proc/pid/mem proc: make check_mem_permission() return an mm_struct on success proc: hold cred_guard_mutex in check_mem_permission() proc: disable mem_write after exec mm: implement access_remote_vm mm: factor out main logic of access_process_vm mm: use mm_struct to resolve gate vma's in __get_user_pages mm: arch: rename in_gate_area_no_task to in_gate_area_no_mm mm: arch: make in_gate_area take an mm_struct instead of a task_struct mm: arch: make get_gate_vma take an mm_struct instead of a task_struct x86: mark associated mm when running a task in 32 bit compatibility mode x86: add context tag to mark mm when running a task in 32-bit compatibility mode auxv: require the target to be tracable (or yourself) close race in /proc/*/environ report errors in /proc/*/*map* sanely pagemap: close races with suid execve make sessionid permissions in /proc/*/task/* match those in /proc/* fix leaks in path_lookupat() Fix up trivial conflicts in fs/proc/base.c
Diffstat (limited to 'fs/namei.c')
-rw-r--r--fs/namei.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/fs/namei.c b/fs/namei.c
index fc858b1124c2..d0066e17d45d 100644
--- a/fs/namei.c
+++ b/fs/namei.c
@@ -1650,13 +1650,16 @@ static int path_lookupat(int dfd, const char *name,
1650 err = -ECHILD; 1650 err = -ECHILD;
1651 } 1651 }
1652 1652
1653 if (!err) 1653 if (!err) {
1654 err = handle_reval_path(nd); 1654 err = handle_reval_path(nd);
1655 if (err)
1656 path_put(&nd->path);
1657 }
1655 1658
1656 if (!err && nd->flags & LOOKUP_DIRECTORY) { 1659 if (!err && nd->flags & LOOKUP_DIRECTORY) {
1657 if (!nd->inode->i_op->lookup) { 1660 if (!nd->inode->i_op->lookup) {
1658 path_put(&nd->path); 1661 path_put(&nd->path);
1659 return -ENOTDIR; 1662 err = -ENOTDIR;
1660 } 1663 }
1661 } 1664 }
1662 1665