Loading fs/cifs/cifsencrypt.c +2 −1 Original line number Diff line number Diff line Loading @@ -109,7 +109,8 @@ static int cifs_calc_signature2(const struct kvec *iov, int n_vec, if (i == 0) { if (iov[0].iov_len <= 8 ) /* cmd field at offset 9 */ break; /* nothing to sign or corrupt header */ MD5Update(&context,iov[0].iov_base+4, iov[0].iov_len-4); MD5Update(&context, iov[0].iov_base+4, iov[0].iov_len-4); } else MD5Update(&context, iov[i].iov_base, iov[i].iov_len); } Loading fs/cifs/cifsfs.c +13 −7 Original line number Diff line number Diff line Loading @@ -71,16 +71,20 @@ static struct task_struct *dnotifyThread = NULL; static const struct super_operations cifs_super_ops; unsigned int CIFSMaxBufSize = CIFS_MAX_MSGSIZE; module_param(CIFSMaxBufSize, int, 0); MODULE_PARM_DESC(CIFSMaxBufSize,"Network buffer size (not including header). Default: 16384 Range: 8192 to 130048"); MODULE_PARM_DESC(CIFSMaxBufSize, "Network buffer size (not including header). " "Default: 16384 Range: 8192 to 130048"); unsigned int cifs_min_rcv = CIFS_MIN_RCV_POOL; module_param(cifs_min_rcv, int, 0); MODULE_PARM_DESC(cifs_min_rcv,"Network buffers in pool. Default: 4 Range: 1 to 64"); MODULE_PARM_DESC(cifs_min_rcv, "Network buffers in pool. Default: 4 Range: " "1 to 64"); unsigned int cifs_min_small = 30; module_param(cifs_min_small, int, 0); MODULE_PARM_DESC(cifs_min_small,"Small network buffers in pool. Default: 30 Range: 2 to 256"); MODULE_PARM_DESC(cifs_min_small, "Small network buffers in pool. Default: 30 " "Range: 2 to 256"); unsigned int cifs_max_pending = CIFS_MAX_REQ; module_param(cifs_max_pending, int, 0); MODULE_PARM_DESC(cifs_max_pending,"Simultaneous requests to server. Default: 50 Range: 2 to 256"); MODULE_PARM_DESC(cifs_max_pending, "Simultaneous requests to server. " "Default: 50 Range: 2 to 256"); extern mempool_t *cifs_sm_req_poolp; extern mempool_t *cifs_req_poolp; Loading Loading @@ -902,7 +906,8 @@ static int cifs_oplock_thread(void *dummyarg) 0 /* len */ , 0 /* offset */, 0, 0, LOCKING_ANDX_OPLOCK_RELEASE, 0 /* wait flag */); cFYI(1,("Oplock release rc = %d ", rc)); cFYI(1, ("Oplock release rc = %d ", rc)); } } else spin_unlock(&GlobalMid_Lock); Loading Loading @@ -1040,7 +1045,7 @@ init_cifs(void) static void __exit exit_cifs(void) { cFYI(0, ("In unregister ie exit_cifs")); cFYI(0, ("exit_cifs")); #ifdef CONFIG_PROC_FS cifs_proc_clean(); #endif Loading @@ -1055,7 +1060,8 @@ exit_cifs(void) MODULE_AUTHOR("Steve French <sfrench@us.ibm.com>"); MODULE_LICENSE("GPL"); /* combination of LGPL + GPL source behaves as GPL */ MODULE_DESCRIPTION ("VFS to access servers complying with the SNIA CIFS Specification e.g. Samba and Windows"); ("VFS to access servers complying with the SNIA CIFS Specification " "e.g. Samba and Windows"); MODULE_VERSION(CIFS_VERSION); module_init(init_cifs) module_exit(exit_cifs) fs/cifs/cifssmb.c +22 −11 Original line number Diff line number Diff line Loading @@ -132,10 +132,13 @@ small_smb_init(int smb_command, int wct, struct cifsTconInfo *tcon, /* Give Demultiplex thread up to 10 seconds to reconnect, should be greater than cifs socket timeout which is 7 seconds */ while(tcon->ses->server->tcpStatus == CifsNeedReconnect) { while(tcon->ses->server->tcpStatus == CifsNeedReconnect) { wait_event_interruptible_timeout(tcon->ses->server->response_q, (tcon->ses->server->tcpStatus == CifsGood), 10 * HZ); if (tcon->ses->server->tcpStatus == CifsNeedReconnect) { (tcon->ses->server->tcpStatus == CifsGood), 10 * HZ); if (tcon->ses->server->tcpStatus == CifsNeedReconnect) { /* on "soft" mounts we wait once */ if ((tcon->retry == FALSE) || (tcon->ses->status == CifsExiting)) { Loading Loading @@ -209,7 +212,8 @@ small_smb_init(int smb_command, int wct, struct cifsTconInfo *tcon, return -ENOMEM; } header_assemble((struct smb_hdr *) *request_buf, smb_command, tcon,wct); header_assemble((struct smb_hdr *) *request_buf, smb_command, tcon,wct); if (tcon != NULL) cifs_stats_inc(&tcon->num_smbs_sent); Loading Loading @@ -274,9 +278,11 @@ smb_init(int smb_command, int wct, struct cifsTconInfo *tcon, /* Give Demultiplex thread up to 10 seconds to reconnect, should be greater than cifs socket timeout which is 7 seconds */ while(tcon->ses->server->tcpStatus == CifsNeedReconnect) { while (tcon->ses->server->tcpStatus == CifsNeedReconnect) { wait_event_interruptible_timeout(tcon->ses->server->response_q, (tcon->ses->server->tcpStatus == CifsGood), 10 * HZ); (tcon->ses->server->tcpStatus == CifsGood), 10 * HZ); if (tcon->ses->server->tcpStatus == CifsNeedReconnect) { /* on "soft" mounts we wait once */ Loading Loading @@ -381,7 +387,8 @@ static int validate_t2(struct smb_t2_rsp *pSMB) /* check that bcc is less than negotiated smb buffer */ total_size = le16_to_cpu(pSMB->t2_rsp.ParameterCount); if (total_size < 512) { total_size+=le16_to_cpu(pSMB->t2_rsp.DataCount); total_size += le16_to_cpu(pSMB->t2_rsp.DataCount); /* BCC le converted in SendReceive */ pBCC = (pSMB->hdr.WordCount * 2) + sizeof(struct smb_hdr) + Loading Loading @@ -2608,7 +2615,7 @@ CIFSSMBQueryReparseLinkInfo(const int xid, struct cifsTconInfo *tcon, reparse_buf->TargetNameOffset + reparse_buf->TargetNameLen) > end_of_smb) { cFYI(1,("reparse buf extended beyond SMB")); cFYI(1,("reparse buf goes beyond SMB")); rc = -EIO; goto qreparse_out; } Loading @@ -2632,7 +2639,8 @@ CIFSSMBQueryReparseLinkInfo(const int xid, struct cifsTconInfo *tcon, } } else { rc = -EIO; cFYI(1,("Invalid return data count on get reparse info ioctl")); cFYI(1, ("Invalid return data count on " "get reparse info ioctl")); } symlinkinfo[buflen] = 0; /* just in case so the caller does not go off the end of the buffer */ Loading Loading @@ -2750,7 +2758,8 @@ static __u16 ACL_to_cifs_posix(char *parm_data, const char *pACL, return 0; count = posix_acl_xattr_count((size_t)buflen); cFYI(1,("setting acl with %d entries from buf of length %d and version of %d", cFYI(1,("setting acl with %d entries from buf of length %d and " "version of %d", count, buflen, le32_to_cpu(local_acl->a_version))); if (le32_to_cpu(local_acl->a_version) != 2) { cFYI(1, ("unknown POSIX ACL version %d", Loading Loading @@ -3957,7 +3966,9 @@ getDFSRetry: (8 /* sizeof start of data block */ + data_offset + (char *) &pSMBr->hdr.Protocol); cFYI(1,("num_referrals: %d dfs flags: 0x%x ... \nfor referral one refer size: 0x%x srv type: 0x%x refer flags: 0x%x ttl: 0x%x", cFYI(1,("num_referrals: %d dfs flags: 0x%x ... \n" "for referral one refer size: 0x%x srv " "type: 0x%x refer flags: 0x%x ttl: 0x%x", le16_to_cpu(pSMBr->NumberOfReferrals), le16_to_cpu(pSMBr->DFSFlags), le16_to_cpu(referrals->ReferralSize), Loading fs/cifs/connect.c +28 −15 Original line number Diff line number Diff line Loading @@ -278,7 +278,7 @@ static int coalesce_t2(struct smb_hdr *psecond, struct smb_hdr *pTargetSMB) total_data_size = le16_to_cpu(pSMBt->t2_rsp.TotalDataCount); if (total_data_size != le16_to_cpu(pSMB2->t2_rsp.TotalDataCount)) { cFYI(1, ("total data sizes of primary and secondary t2 differ")); cFYI(1, ("total data size of primary and secondary t2 differ")); } total_in_buf = le16_to_cpu(pSMBt->t2_rsp.DataCount); Loading Loading @@ -1036,7 +1036,8 @@ cifs_parse_mount_options(char *options, const char *devname, } } else if (strnicmp(data, "iocharset", 9) == 0) { if (!value || !*value) { printk(KERN_WARNING "CIFS: invalid iocharset specified\n"); printk(KERN_WARNING "CIFS: invalid iocharset " "specified\n"); return 1; /* needs_arg; */ } if (strnlen(value, 65) < 65) { Loading @@ -1046,7 +1047,8 @@ cifs_parse_mount_options(char *options, const char *devname, is used by caller */ cFYI(1, ("iocharset set to %s", value)); } else { printk(KERN_WARNING "CIFS: iocharset name too long.\n"); printk(KERN_WARNING "CIFS: iocharset name " "too long.\n"); return 1; } } else if (strnicmp(data, "uid", 3) == 0) { Loading Loading @@ -1098,7 +1100,7 @@ cifs_parse_mount_options(char *options, const char *devname, } } else if (strnicmp(data, "netbiosname", 4) == 0) { if (!value || !*value || (*value == ' ')) { cFYI(1, ("invalid (empty) netbiosname specified")); cFYI(1, ("invalid (empty) netbiosname")); } else { memset(vol->source_rfc1001_name, 0x20, 15); for (i = 0; i < 15; i++) { Loading Loading @@ -2827,7 +2829,8 @@ CIFSNTLMSSPNegotiateSessSetup(unsigned int xid, bcc_ptr++; } else cFYI(1, ("Variable field of length %d extends beyond end of smb", ("field of length %d " "extends beyond end of smb", len)); } } else { Loading Loading @@ -2990,13 +2993,17 @@ CIFSNTLMSSPAuthSessSetup(unsigned int xid, struct cifsSesInfo *ses, cpu_to_le16(len); } /* SecurityBlob->WorkstationName.Length = cifs_strtoUCS((__le16 *) bcc_ptr, "AMACHINE",64, nls_codepage); /* SecurityBlob->WorkstationName.Length = cifs_strtoUCS((__le16 *) bcc_ptr, "AMACHINE",64, nls_codepage); SecurityBlob->WorkstationName.Length *= 2; SecurityBlob->WorkstationName.MaximumLength = cpu_to_le16(SecurityBlob->WorkstationName.Length); SecurityBlob->WorkstationName.Buffer = cpu_to_le32(SecurityBlobLength); SecurityBlob->WorkstationName.MaximumLength = cpu_to_le16(SecurityBlob->WorkstationName.Length); SecurityBlob->WorkstationName.Buffer = cpu_to_le32(SecurityBlobLength); bcc_ptr += SecurityBlob->WorkstationName.Length; SecurityBlobLength += SecurityBlob->WorkstationName.Length; SecurityBlob->WorkstationName.Length = cpu_to_le16(SecurityBlob->WorkstationName.Length); */ SecurityBlob->WorkstationName.Length = cpu_to_le16(SecurityBlob->WorkstationName.Length); */ if ((long) bcc_ptr % 2) { *bcc_ptr = 0; Loading Loading @@ -3216,7 +3223,8 @@ CIFSNTLMSSPAuthSessSetup(unsigned int xid, struct cifsSesInfo *ses, kfree(ses->serverNOS); ses->serverNOS = kzalloc(len+1, GFP_KERNEL); strncpy(ses->serverNOS, bcc_ptr, len); strncpy(ses->serverNOS, bcc_ptr, len); bcc_ptr += len; bcc_ptr[0] = 0; bcc_ptr++; Loading @@ -3224,19 +3232,24 @@ CIFSNTLMSSPAuthSessSetup(unsigned int xid, struct cifsSesInfo *ses, len = strnlen(bcc_ptr, 1024); if (ses->serverDomain) kfree(ses->serverDomain); ses->serverDomain = kzalloc(len+1,GFP_KERNEL); strncpy(ses->serverDomain, bcc_ptr, len); ses->serverDomain = kzalloc(len+1, GFP_KERNEL); strncpy(ses->serverDomain, bcc_ptr, len); bcc_ptr += len; bcc_ptr[0] = 0; bcc_ptr++; } else cFYI(1, ("Variable field of length %d extends beyond end of smb ", ("field of length %d " "extends beyond end of smb ", len)); } } else { cERROR(1, (" Security Blob Length extends beyond end of SMB")); (" Security Blob extends beyond end " "of SMB")); } } else { cERROR(1, ("No session structure passed in.")); Loading fs/cifs/file.c +3 −2 Original line number Diff line number Diff line Loading @@ -502,7 +502,8 @@ int cifs_close(struct inode *inode, struct file *file) timeout *= 4; } if (atomic_read(&pSMBFile->wrtPending)) cERROR(1,("close with pending writes")); cERROR(1, ("close with pending writes")); rc = CIFSSMBClose(xid, pTcon, pSMBFile->netfid); } Loading Loading @@ -1285,7 +1286,7 @@ retry: 1); atomic_dec(&open_file->wrtPending); if (rc || bytes_written < bytes_to_write) { cERROR(1,("Write2 ret %d, written = %d", cERROR(1, ("Write2 ret %d, wrote %d", rc, bytes_written)); /* BB what if continued retry is requested via mount flags? */ Loading Loading
fs/cifs/cifsencrypt.c +2 −1 Original line number Diff line number Diff line Loading @@ -109,7 +109,8 @@ static int cifs_calc_signature2(const struct kvec *iov, int n_vec, if (i == 0) { if (iov[0].iov_len <= 8 ) /* cmd field at offset 9 */ break; /* nothing to sign or corrupt header */ MD5Update(&context,iov[0].iov_base+4, iov[0].iov_len-4); MD5Update(&context, iov[0].iov_base+4, iov[0].iov_len-4); } else MD5Update(&context, iov[i].iov_base, iov[i].iov_len); } Loading
fs/cifs/cifsfs.c +13 −7 Original line number Diff line number Diff line Loading @@ -71,16 +71,20 @@ static struct task_struct *dnotifyThread = NULL; static const struct super_operations cifs_super_ops; unsigned int CIFSMaxBufSize = CIFS_MAX_MSGSIZE; module_param(CIFSMaxBufSize, int, 0); MODULE_PARM_DESC(CIFSMaxBufSize,"Network buffer size (not including header). Default: 16384 Range: 8192 to 130048"); MODULE_PARM_DESC(CIFSMaxBufSize, "Network buffer size (not including header). " "Default: 16384 Range: 8192 to 130048"); unsigned int cifs_min_rcv = CIFS_MIN_RCV_POOL; module_param(cifs_min_rcv, int, 0); MODULE_PARM_DESC(cifs_min_rcv,"Network buffers in pool. Default: 4 Range: 1 to 64"); MODULE_PARM_DESC(cifs_min_rcv, "Network buffers in pool. Default: 4 Range: " "1 to 64"); unsigned int cifs_min_small = 30; module_param(cifs_min_small, int, 0); MODULE_PARM_DESC(cifs_min_small,"Small network buffers in pool. Default: 30 Range: 2 to 256"); MODULE_PARM_DESC(cifs_min_small, "Small network buffers in pool. Default: 30 " "Range: 2 to 256"); unsigned int cifs_max_pending = CIFS_MAX_REQ; module_param(cifs_max_pending, int, 0); MODULE_PARM_DESC(cifs_max_pending,"Simultaneous requests to server. Default: 50 Range: 2 to 256"); MODULE_PARM_DESC(cifs_max_pending, "Simultaneous requests to server. " "Default: 50 Range: 2 to 256"); extern mempool_t *cifs_sm_req_poolp; extern mempool_t *cifs_req_poolp; Loading Loading @@ -902,7 +906,8 @@ static int cifs_oplock_thread(void *dummyarg) 0 /* len */ , 0 /* offset */, 0, 0, LOCKING_ANDX_OPLOCK_RELEASE, 0 /* wait flag */); cFYI(1,("Oplock release rc = %d ", rc)); cFYI(1, ("Oplock release rc = %d ", rc)); } } else spin_unlock(&GlobalMid_Lock); Loading Loading @@ -1040,7 +1045,7 @@ init_cifs(void) static void __exit exit_cifs(void) { cFYI(0, ("In unregister ie exit_cifs")); cFYI(0, ("exit_cifs")); #ifdef CONFIG_PROC_FS cifs_proc_clean(); #endif Loading @@ -1055,7 +1060,8 @@ exit_cifs(void) MODULE_AUTHOR("Steve French <sfrench@us.ibm.com>"); MODULE_LICENSE("GPL"); /* combination of LGPL + GPL source behaves as GPL */ MODULE_DESCRIPTION ("VFS to access servers complying with the SNIA CIFS Specification e.g. Samba and Windows"); ("VFS to access servers complying with the SNIA CIFS Specification " "e.g. Samba and Windows"); MODULE_VERSION(CIFS_VERSION); module_init(init_cifs) module_exit(exit_cifs)
fs/cifs/cifssmb.c +22 −11 Original line number Diff line number Diff line Loading @@ -132,10 +132,13 @@ small_smb_init(int smb_command, int wct, struct cifsTconInfo *tcon, /* Give Demultiplex thread up to 10 seconds to reconnect, should be greater than cifs socket timeout which is 7 seconds */ while(tcon->ses->server->tcpStatus == CifsNeedReconnect) { while(tcon->ses->server->tcpStatus == CifsNeedReconnect) { wait_event_interruptible_timeout(tcon->ses->server->response_q, (tcon->ses->server->tcpStatus == CifsGood), 10 * HZ); if (tcon->ses->server->tcpStatus == CifsNeedReconnect) { (tcon->ses->server->tcpStatus == CifsGood), 10 * HZ); if (tcon->ses->server->tcpStatus == CifsNeedReconnect) { /* on "soft" mounts we wait once */ if ((tcon->retry == FALSE) || (tcon->ses->status == CifsExiting)) { Loading Loading @@ -209,7 +212,8 @@ small_smb_init(int smb_command, int wct, struct cifsTconInfo *tcon, return -ENOMEM; } header_assemble((struct smb_hdr *) *request_buf, smb_command, tcon,wct); header_assemble((struct smb_hdr *) *request_buf, smb_command, tcon,wct); if (tcon != NULL) cifs_stats_inc(&tcon->num_smbs_sent); Loading Loading @@ -274,9 +278,11 @@ smb_init(int smb_command, int wct, struct cifsTconInfo *tcon, /* Give Demultiplex thread up to 10 seconds to reconnect, should be greater than cifs socket timeout which is 7 seconds */ while(tcon->ses->server->tcpStatus == CifsNeedReconnect) { while (tcon->ses->server->tcpStatus == CifsNeedReconnect) { wait_event_interruptible_timeout(tcon->ses->server->response_q, (tcon->ses->server->tcpStatus == CifsGood), 10 * HZ); (tcon->ses->server->tcpStatus == CifsGood), 10 * HZ); if (tcon->ses->server->tcpStatus == CifsNeedReconnect) { /* on "soft" mounts we wait once */ Loading Loading @@ -381,7 +387,8 @@ static int validate_t2(struct smb_t2_rsp *pSMB) /* check that bcc is less than negotiated smb buffer */ total_size = le16_to_cpu(pSMB->t2_rsp.ParameterCount); if (total_size < 512) { total_size+=le16_to_cpu(pSMB->t2_rsp.DataCount); total_size += le16_to_cpu(pSMB->t2_rsp.DataCount); /* BCC le converted in SendReceive */ pBCC = (pSMB->hdr.WordCount * 2) + sizeof(struct smb_hdr) + Loading Loading @@ -2608,7 +2615,7 @@ CIFSSMBQueryReparseLinkInfo(const int xid, struct cifsTconInfo *tcon, reparse_buf->TargetNameOffset + reparse_buf->TargetNameLen) > end_of_smb) { cFYI(1,("reparse buf extended beyond SMB")); cFYI(1,("reparse buf goes beyond SMB")); rc = -EIO; goto qreparse_out; } Loading @@ -2632,7 +2639,8 @@ CIFSSMBQueryReparseLinkInfo(const int xid, struct cifsTconInfo *tcon, } } else { rc = -EIO; cFYI(1,("Invalid return data count on get reparse info ioctl")); cFYI(1, ("Invalid return data count on " "get reparse info ioctl")); } symlinkinfo[buflen] = 0; /* just in case so the caller does not go off the end of the buffer */ Loading Loading @@ -2750,7 +2758,8 @@ static __u16 ACL_to_cifs_posix(char *parm_data, const char *pACL, return 0; count = posix_acl_xattr_count((size_t)buflen); cFYI(1,("setting acl with %d entries from buf of length %d and version of %d", cFYI(1,("setting acl with %d entries from buf of length %d and " "version of %d", count, buflen, le32_to_cpu(local_acl->a_version))); if (le32_to_cpu(local_acl->a_version) != 2) { cFYI(1, ("unknown POSIX ACL version %d", Loading Loading @@ -3957,7 +3966,9 @@ getDFSRetry: (8 /* sizeof start of data block */ + data_offset + (char *) &pSMBr->hdr.Protocol); cFYI(1,("num_referrals: %d dfs flags: 0x%x ... \nfor referral one refer size: 0x%x srv type: 0x%x refer flags: 0x%x ttl: 0x%x", cFYI(1,("num_referrals: %d dfs flags: 0x%x ... \n" "for referral one refer size: 0x%x srv " "type: 0x%x refer flags: 0x%x ttl: 0x%x", le16_to_cpu(pSMBr->NumberOfReferrals), le16_to_cpu(pSMBr->DFSFlags), le16_to_cpu(referrals->ReferralSize), Loading
fs/cifs/connect.c +28 −15 Original line number Diff line number Diff line Loading @@ -278,7 +278,7 @@ static int coalesce_t2(struct smb_hdr *psecond, struct smb_hdr *pTargetSMB) total_data_size = le16_to_cpu(pSMBt->t2_rsp.TotalDataCount); if (total_data_size != le16_to_cpu(pSMB2->t2_rsp.TotalDataCount)) { cFYI(1, ("total data sizes of primary and secondary t2 differ")); cFYI(1, ("total data size of primary and secondary t2 differ")); } total_in_buf = le16_to_cpu(pSMBt->t2_rsp.DataCount); Loading Loading @@ -1036,7 +1036,8 @@ cifs_parse_mount_options(char *options, const char *devname, } } else if (strnicmp(data, "iocharset", 9) == 0) { if (!value || !*value) { printk(KERN_WARNING "CIFS: invalid iocharset specified\n"); printk(KERN_WARNING "CIFS: invalid iocharset " "specified\n"); return 1; /* needs_arg; */ } if (strnlen(value, 65) < 65) { Loading @@ -1046,7 +1047,8 @@ cifs_parse_mount_options(char *options, const char *devname, is used by caller */ cFYI(1, ("iocharset set to %s", value)); } else { printk(KERN_WARNING "CIFS: iocharset name too long.\n"); printk(KERN_WARNING "CIFS: iocharset name " "too long.\n"); return 1; } } else if (strnicmp(data, "uid", 3) == 0) { Loading Loading @@ -1098,7 +1100,7 @@ cifs_parse_mount_options(char *options, const char *devname, } } else if (strnicmp(data, "netbiosname", 4) == 0) { if (!value || !*value || (*value == ' ')) { cFYI(1, ("invalid (empty) netbiosname specified")); cFYI(1, ("invalid (empty) netbiosname")); } else { memset(vol->source_rfc1001_name, 0x20, 15); for (i = 0; i < 15; i++) { Loading Loading @@ -2827,7 +2829,8 @@ CIFSNTLMSSPNegotiateSessSetup(unsigned int xid, bcc_ptr++; } else cFYI(1, ("Variable field of length %d extends beyond end of smb", ("field of length %d " "extends beyond end of smb", len)); } } else { Loading Loading @@ -2990,13 +2993,17 @@ CIFSNTLMSSPAuthSessSetup(unsigned int xid, struct cifsSesInfo *ses, cpu_to_le16(len); } /* SecurityBlob->WorkstationName.Length = cifs_strtoUCS((__le16 *) bcc_ptr, "AMACHINE",64, nls_codepage); /* SecurityBlob->WorkstationName.Length = cifs_strtoUCS((__le16 *) bcc_ptr, "AMACHINE",64, nls_codepage); SecurityBlob->WorkstationName.Length *= 2; SecurityBlob->WorkstationName.MaximumLength = cpu_to_le16(SecurityBlob->WorkstationName.Length); SecurityBlob->WorkstationName.Buffer = cpu_to_le32(SecurityBlobLength); SecurityBlob->WorkstationName.MaximumLength = cpu_to_le16(SecurityBlob->WorkstationName.Length); SecurityBlob->WorkstationName.Buffer = cpu_to_le32(SecurityBlobLength); bcc_ptr += SecurityBlob->WorkstationName.Length; SecurityBlobLength += SecurityBlob->WorkstationName.Length; SecurityBlob->WorkstationName.Length = cpu_to_le16(SecurityBlob->WorkstationName.Length); */ SecurityBlob->WorkstationName.Length = cpu_to_le16(SecurityBlob->WorkstationName.Length); */ if ((long) bcc_ptr % 2) { *bcc_ptr = 0; Loading Loading @@ -3216,7 +3223,8 @@ CIFSNTLMSSPAuthSessSetup(unsigned int xid, struct cifsSesInfo *ses, kfree(ses->serverNOS); ses->serverNOS = kzalloc(len+1, GFP_KERNEL); strncpy(ses->serverNOS, bcc_ptr, len); strncpy(ses->serverNOS, bcc_ptr, len); bcc_ptr += len; bcc_ptr[0] = 0; bcc_ptr++; Loading @@ -3224,19 +3232,24 @@ CIFSNTLMSSPAuthSessSetup(unsigned int xid, struct cifsSesInfo *ses, len = strnlen(bcc_ptr, 1024); if (ses->serverDomain) kfree(ses->serverDomain); ses->serverDomain = kzalloc(len+1,GFP_KERNEL); strncpy(ses->serverDomain, bcc_ptr, len); ses->serverDomain = kzalloc(len+1, GFP_KERNEL); strncpy(ses->serverDomain, bcc_ptr, len); bcc_ptr += len; bcc_ptr[0] = 0; bcc_ptr++; } else cFYI(1, ("Variable field of length %d extends beyond end of smb ", ("field of length %d " "extends beyond end of smb ", len)); } } else { cERROR(1, (" Security Blob Length extends beyond end of SMB")); (" Security Blob extends beyond end " "of SMB")); } } else { cERROR(1, ("No session structure passed in.")); Loading
fs/cifs/file.c +3 −2 Original line number Diff line number Diff line Loading @@ -502,7 +502,8 @@ int cifs_close(struct inode *inode, struct file *file) timeout *= 4; } if (atomic_read(&pSMBFile->wrtPending)) cERROR(1,("close with pending writes")); cERROR(1, ("close with pending writes")); rc = CIFSSMBClose(xid, pTcon, pSMBFile->netfid); } Loading Loading @@ -1285,7 +1286,7 @@ retry: 1); atomic_dec(&open_file->wrtPending); if (rc || bytes_written < bytes_to_write) { cERROR(1,("Write2 ret %d, written = %d", cERROR(1, ("Write2 ret %d, wrote %d", rc, bytes_written)); /* BB what if continued retry is requested via mount flags? */ Loading