Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag '5.15-rc2-smb3-fixes' of git://git.samba.org/sfrench/cifs-2.6

Pull cifs fixes from Steve French:
"Six small cifs/smb3 fixes, two for stable:

- important fix for deferred close (found by a git functional test)
related to attribute caching on close.

- four (two cosmetic, two more serious) small fixes for problems
pointed out by smatch via Dan Carpenter

- fix for comment formatting problems pointed out by W=1"

* tag '5.15-rc2-smb3-fixes' of git://git.samba.org/sfrench/cifs-2.6:
cifs: fix incorrect check for null pointer in header_assemble
smb3: correct server pointer dereferencing check to be more consistent
smb3: correct smb3 ACL security descriptor
cifs: Clear modified attribute bit from inode flags
cifs: Deal with some warnings from W=1
cifs: fix a sign extension bug

+21 -9
+3 -2
fs/cifs/connect.c
··· 2389 2389 spin_lock(&cifs_tcp_ses_lock); 2390 2390 cifs_sb = CIFS_SB(sb); 2391 2391 tlink = cifs_get_tlink(cifs_sb_master_tlink(cifs_sb)); 2392 - if (IS_ERR(tlink)) { 2392 + if (tlink == NULL) { 2393 + /* can not match superblock if tlink were ever null */ 2393 2394 spin_unlock(&cifs_tcp_ses_lock); 2394 - return rc; 2395 + return 0; 2395 2396 } 2396 2397 tcon = tlink_tcon(tlink); 2397 2398 ses = tcon->ses;
+2 -2
fs/cifs/file.c
··· 884 884 cinode->lease_granted && 885 885 !test_bit(CIFS_INO_CLOSE_ON_LOCK, &cinode->flags) && 886 886 dclose) { 887 - if (test_bit(CIFS_INO_MODIFIED_ATTR, &cinode->flags)) { 887 + if (test_and_clear_bit(CIFS_INO_MODIFIED_ATTR, &cinode->flags)) { 888 888 inode->i_ctime = inode->i_mtime = current_time(inode); 889 889 cifs_fscache_update_inode_cookie(inode); 890 890 } ··· 3113 3113 struct cifs_tcon *tcon; 3114 3114 struct cifs_sb_info *cifs_sb; 3115 3115 struct dentry *dentry = ctx->cfile->dentry; 3116 - int rc; 3116 + ssize_t rc; 3117 3117 3118 3118 tcon = tlink_tcon(ctx->cfile->tlink); 3119 3119 cifs_sb = CIFS_SB(dentry->d_sb);
+14 -3
fs/cifs/misc.c
··· 264 264 265 265 /* Uid is not converted */ 266 266 buffer->Uid = treeCon->ses->Suid; 267 - buffer->Mid = get_next_mid(treeCon->ses->server); 267 + if (treeCon->ses->server) 268 + buffer->Mid = get_next_mid(treeCon->ses->server); 268 269 } 269 270 if (treeCon->Flags & SMB_SHARE_IS_IN_DFS) 270 271 buffer->Flags2 |= SMBFLG2_DFS; ··· 591 590 592 591 /** 593 592 * cifs_queue_oplock_break - queue the oplock break handler for cfile 593 + * @cfile: The file to break the oplock on 594 594 * 595 595 * This function is called from the demultiplex thread when it 596 596 * receives an oplock break for @cfile. ··· 1067 1065 1068 1066 /** 1069 1067 * cifs_alloc_hash - allocate hash and hash context together 1068 + * @name: The name of the crypto hash algo 1069 + * @shash: Where to put the pointer to the hash algo 1070 + * @sdesc: Where to put the pointer to the hash descriptor 1070 1071 * 1071 1072 * The caller has to make sure @sdesc is initialized to either NULL or 1072 1073 * a valid context. Both can be freed via cifs_free_hash(). ··· 1108 1103 1109 1104 /** 1110 1105 * cifs_free_hash - free hash and hash context together 1106 + * @shash: Where to find the pointer to the hash algo 1107 + * @sdesc: Where to find the pointer to the hash descriptor 1111 1108 * 1112 1109 * Freeing a NULL hash or context is safe. 1113 1110 */ ··· 1125 1118 1126 1119 /** 1127 1120 * rqst_page_get_length - obtain the length and offset for a page in smb_rqst 1128 - * Input: rqst - a smb_rqst, page - a page index for rqst 1129 - * Output: *len - the length for this page, *offset - the offset for this page 1121 + * @rqst: The request descriptor 1122 + * @page: The index of the page to query 1123 + * @len: Where to store the length for this page: 1124 + * @offset: Where to store the offset for this page 1130 1125 */ 1131 1126 void rqst_page_get_length(struct smb_rqst *rqst, unsigned int page, 1132 1127 unsigned int *len, unsigned int *offset) ··· 1161 1152 1162 1153 /** 1163 1154 * copy_path_name - copy src path to dst, possibly truncating 1155 + * @dst: The destination buffer 1156 + * @src: The source name 1164 1157 * 1165 1158 * returns number of bytes written (including trailing nul) 1166 1159 */
+2 -2
fs/cifs/smb2pdu.c
··· 2397 2397 buf->sd.OffsetDacl = cpu_to_le32(ptr - (__u8 *)&buf->sd); 2398 2398 /* Ship the ACL for now. we will copy it into buf later. */ 2399 2399 aclptr = ptr; 2400 - ptr += sizeof(struct cifs_acl); 2400 + ptr += sizeof(struct smb3_acl); 2401 2401 2402 2402 /* create one ACE to hold the mode embedded in reserved special SID */ 2403 2403 acelen = setup_special_mode_ACE((struct cifs_ace *)ptr, (__u64)mode); ··· 2422 2422 acl.AclRevision = ACL_REVISION; /* See 2.4.4.1 of MS-DTYP */ 2423 2423 acl.AclSize = cpu_to_le16(acl_size); 2424 2424 acl.AceCount = cpu_to_le16(ace_count); 2425 - memcpy(aclptr, &acl, sizeof(struct cifs_acl)); 2425 + memcpy(aclptr, &acl, sizeof(struct smb3_acl)); 2426 2426 2427 2427 buf->ccontext.DataLength = cpu_to_le32(ptr - (__u8 *)&buf->sd); 2428 2428 *len = roundup(ptr - (__u8 *)buf, 8);