summaryrefslogtreecommitdiffstats
path: root/fs/cifs
diff options
context:
space:
mode:
authorCyrill Gorcunov <gorcunov@gmail.com>2007-08-18 00:15:20 +0000
committerSteve French <sfrench@us.ibm.com>2007-08-18 00:15:20 +0000
commit5e6e6232753482dc0024a319b9d8f611d7a80c19 (patch)
tree33727af8b438b861787a7117240656351ee97726 /fs/cifs
parentaf5a032b8082cddb4dc62a9ff94bf1ec4d34a044 (diff)
downloadop-kernel-dev-5e6e6232753482dc0024a319b9d8f611d7a80c19.zip
op-kernel-dev-5e6e6232753482dc0024a319b9d8f611d7a80c19.tar.gz
[CIFS] Check return code on failed alloc
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com> Signed-off-by: Steve French <sfrench@us.ibm.com>
Diffstat (limited to 'fs/cifs')
-rw-r--r--fs/cifs/README6
-rw-r--r--fs/cifs/sess.c4
2 files changed, 10 insertions, 0 deletions
diff --git a/fs/cifs/README b/fs/cifs/README
index fa096f9..b806b11 100644
--- a/fs/cifs/README
+++ b/fs/cifs/README
@@ -458,6 +458,12 @@ A partial list of the supported mount options follows:
byte range locks).
remount remount the share (often used to change from ro to rw mounts
or vice versa)
+ servern Specify the server 's netbios name (RFC1001 name) to use
+ when attempting to setup a session to the server. This is
+ This is needed for mounting to some older servers (such
+ as OS/2 or Windows 98 and Windows ME) since they do not
+ support a default server name. A server name can be up
+ to 15 characters long and is usually uppercased.
sfu When the CIFS Unix Extensions are not negotiated, attempt to
create device files and fifos in a format compatible with
Services for Unix (SFU). In addition retrieve bits 10-12
diff --git a/fs/cifs/sess.c b/fs/cifs/sess.c
index 2ea027d..892be9b 100644
--- a/fs/cifs/sess.c
+++ b/fs/cifs/sess.c
@@ -372,6 +372,10 @@ CIFS_SessSetup(unsigned int xid, struct cifsSesInfo *ses, int first_time,
/* 2000 big enough to fit max user, domain, NOS name etc. */
str_area = kmalloc(2000, GFP_KERNEL);
+ if (str_area == NULL) {
+ cifs_small_buf_release(smb_buf);
+ return -ENOMEM;
+ }
bcc_ptr = str_area;
ses->flags &= ~CIFS_SES_LANMAN;
OpenPOWER on IntegriCloud