aboutsummaryrefslogtreecommitdiffstats
path: root/fs/cifs/inode.c
diff options
context:
space:
mode:
authorIgor Mammedov <niallain@gmail.com>2009-02-10 06:10:26 -0500
committerSteve French <sfrench@us.ibm.com>2009-02-20 22:36:21 -0500
commite4cce94c9c8797b08faf6a79396df4d175e377fa (patch)
tree6eb306603652bf08ca10fef4f899332f30d71e09 /fs/cifs/inode.c
parente1f81c8a417be466e85a38b61679aa6860ec7331 (diff)
[CIFS] Prevent OOPs when mounting with remote prefixpath.
Fixes OOPs with message 'kernel BUG at fs/cifs/cifs_dfs_ref.c:274!'. Checks if the prefixpath in an accesible while we are still in cifs_mount and fails with reporting a error if we can't access the prefixpath Should fix Samba bugs 6086 and 5861 and kernel bug 12192 Signed-off-by: Igor Mammedov <niallain@gmail.com> Acked-by: Jeff Layton <jlayton@redhat.com> Signed-off-by: Steve French <sfrench@us.ibm.com>
Diffstat (limited to 'fs/cifs/inode.c')
-rw-r--r--fs/cifs/inode.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/cifs/inode.c b/fs/cifs/inode.c
index bcf7b5184664..7342bfb02ae0 100644
--- a/fs/cifs/inode.c
+++ b/fs/cifs/inode.c
@@ -621,7 +621,7 @@ static const struct inode_operations cifs_ipc_inode_ops = {
621 .lookup = cifs_lookup, 621 .lookup = cifs_lookup,
622}; 622};
623 623
624static char *build_path_to_root(struct cifs_sb_info *cifs_sb) 624char *cifs_build_path_to_root(struct cifs_sb_info *cifs_sb)
625{ 625{
626 int pplen = cifs_sb->prepathlen; 626 int pplen = cifs_sb->prepathlen;
627 int dfsplen; 627 int dfsplen;
@@ -678,7 +678,7 @@ struct inode *cifs_iget(struct super_block *sb, unsigned long ino)
678 return inode; 678 return inode;
679 679
680 cifs_sb = CIFS_SB(inode->i_sb); 680 cifs_sb = CIFS_SB(inode->i_sb);
681 full_path = build_path_to_root(cifs_sb); 681 full_path = cifs_build_path_to_root(cifs_sb);
682 if (full_path == NULL) 682 if (full_path == NULL)
683 return ERR_PTR(-ENOMEM); 683 return ERR_PTR(-ENOMEM);
684 684