]> git.proxmox.com Git - mirror_ubuntu-disco-kernel.git/commitdiff
cifs: fix check of error return from is_path_accessable
authorJeff Layton <jlayton@redhat.com>
Tue, 7 Dec 2010 02:07:33 +0000 (21:07 -0500)
committerSteve French <sfrench@us.ibm.com>
Tue, 7 Dec 2010 19:17:59 +0000 (19:17 +0000)
This function will return 0 if everything went ok. Commit 9d002df4
however added a block of code after the following check for
rc == -EREMOTE. With that change and when rc == 0, doing the
"goto mount_fail_check" here skips that code, leaving the tlink_tree
and master_tlink pointer unpopulated. That causes an oops later
in cifs_root_iget.

Reported-and-Tested-by: Robbert Kouprie <robbert@exx.nl>
Signed-off-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: Steve French <sfrench@us.ibm.com>
fs/cifs/connect.c

index 53f9c31a52b2ffeb76d7be815b9ae8d3eff2724e..387b91ae74002cadb4e38de77b9cf5c5bb482223 100644 (file)
@@ -2839,7 +2839,7 @@ remote_path_check:
                        goto mount_fail_check;
                }
                rc = is_path_accessible(xid, tcon, cifs_sb, full_path);
-               if (rc != -EREMOTE) {
+               if (rc != 0 && rc != -EREMOTE) {
                        kfree(full_path);
                        goto mount_fail_check;
                }