[linux-cifs-client] [PATCH 2/2] cifs: disable sharing of server,
session and tcon
Jeff Layton
jlayton at redhat.com
Mon Oct 6 17:10:43 GMT 2008
The code that allows these structs to be shared is extremely racy.
Disable it for now until we can come up with a way to do this that
doesn't lead to oopses and memory corruption.
Details about some of the races are here:
https://bugzilla.samba.org/show_bug.cgi?id=5720
Signed-off-by: Jeff Layton <jlayton at redhat.com>
---
fs/cifs/connect.c | 12 +++++++++++-
1 files changed, 11 insertions(+), 1 deletions(-)
diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c
index 1f4e0ba..334ae45 100644
--- a/fs/cifs/connect.c
+++ b/fs/cifs/connect.c
@@ -1324,6 +1324,7 @@ cifs_parse_mount_options(char *options, const char *devname,
return 0;
}
+#if 0
static struct cifsSesInfo *
cifs_find_tcp_session(struct in_addr *target_ip_addr,
struct in6_addr *target_ip6_addr,
@@ -1411,6 +1412,7 @@ find_unc(__be32 new_target_ip_addr, char *uncName, char *userName)
read_unlock(&GlobalSMBSeslock);
return NULL;
}
+#endif
int
get_dfs_path(int xid, struct cifsSesInfo *pSesInfo, const char *old_path,
@@ -1929,6 +1931,7 @@ cifs_mount(struct super_block *sb, struct cifs_sb_info *cifs_sb,
}
}
+#if 0
if (address_type == AF_INET)
existingCifsSes = cifs_find_tcp_session(&sin_server.sin_addr,
NULL /* no ipv6 addr */,
@@ -1942,6 +1945,9 @@ cifs_mount(struct super_block *sb, struct cifs_sb_info *cifs_sb,
rc = -EINVAL;
goto out;
}
+#endif
+ srvTcp = NULL;
+ existingCifsSes = NULL;
if (srvTcp) {
cFYI(1, ("Existing tcp session with server found"));
@@ -2147,10 +2153,14 @@ cifs_mount(struct super_block *sb, struct cifs_sb_info *cifs_sb,
if ((volume_info.cifs_acl) && (volume_info.dynperm))
cERROR(1, ("mount option dynperm ignored if cifsacl "
"mount option supported"));
-
+#if 0
tcon =
find_unc(sin_server.sin_addr.s_addr, volume_info.UNC,
volume_info.username);
+#endif
+
+ tcon = NULL;
+
if (tcon) {
cFYI(1, ("Found match on UNC path"));
/* we can have only one retry value for a connection
--
1.5.5.1
More information about the linux-cifs-client
mailing list