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.12-rc3-smb3' of git://git.samba.org/sfrench/cifs-2.6

Pull cifs fixes from Steve French:
"Five cifs/smb3 fixes - three for stable, including an important ACL
fix and security signature fix"

* tag '5.12-rc3-smb3' of git://git.samba.org/sfrench/cifs-2.6:
cifs: fix allocation size on newly created files
cifs: warn and fail if trying to use rootfs without the config option
fs/cifs/: fix misspellings using codespell tool
cifs: Fix preauth hash corruption
cifs: update new ACE pointer after populate_new_aces.

+26 -8
+1 -1
fs/cifs/cifs_swn.c
··· 248 248 249 249 /* 250 250 * Try to find a matching registration for the tcon's server name and share name. 251 - * Calls to this funciton must be protected by cifs_swnreg_idr_mutex. 251 + * Calls to this function must be protected by cifs_swnreg_idr_mutex. 252 252 * TODO Try to avoid memory allocations 253 253 */ 254 254 static struct cifs_swn_reg *cifs_find_swn_reg(struct cifs_tcon *tcon)
+6 -3
fs/cifs/cifsacl.c
··· 1118 1118 /* Retain old ACEs which we can retain */ 1119 1119 for (i = 0; i < src_num_aces; ++i) { 1120 1120 pntace = (struct cifs_ace *) (acl_base + size); 1121 - pnntace = (struct cifs_ace *) (nacl_base + nsize); 1122 1121 1123 1122 if (!new_aces_set && (pntace->flags & INHERITED_ACE)) { 1124 1123 /* Place the new ACEs in between existing explicit and inherited */ ··· 1130 1131 } 1131 1132 1132 1133 /* If it's any one of the ACE we're replacing, skip! */ 1133 - if ((compare_sids(&pntace->sid, &sid_unix_NFS_mode) == 0) || 1134 + if (!mode_from_sid && 1135 + ((compare_sids(&pntace->sid, &sid_unix_NFS_mode) == 0) || 1134 1136 (compare_sids(&pntace->sid, pownersid) == 0) || 1135 1137 (compare_sids(&pntace->sid, pgrpsid) == 0) || 1136 1138 (compare_sids(&pntace->sid, &sid_everyone) == 0) || 1137 - (compare_sids(&pntace->sid, &sid_authusers) == 0)) { 1139 + (compare_sids(&pntace->sid, &sid_authusers) == 0))) { 1138 1140 goto next_ace; 1139 1141 } 1142 + 1143 + /* update the pointer to the next ACE to populate*/ 1144 + pnntace = (struct cifs_ace *) (nacl_base + nsize); 1140 1145 1141 1146 nsize += cifs_copy_ace(pnntace, pntace, NULL); 1142 1147 num_aces++;
+4 -2
fs/cifs/fs_context.c
··· 1196 1196 pr_warn_once("Witness protocol support is experimental\n"); 1197 1197 break; 1198 1198 case Opt_rootfs: 1199 - #ifdef CONFIG_CIFS_ROOT 1200 - ctx->rootfs = true; 1199 + #ifndef CONFIG_CIFS_ROOT 1200 + cifs_dbg(VFS, "rootfs support requires CONFIG_CIFS_ROOT config option\n"); 1201 + goto cifs_parse_mount_err; 1201 1202 #endif 1203 + ctx->rootfs = true; 1202 1204 break; 1203 1205 case Opt_posixpaths: 1204 1206 if (result.negated)
+9 -1
fs/cifs/inode.c
··· 2395 2395 * We need to be sure that all dirty pages are written and the server 2396 2396 * has actual ctime, mtime and file length. 2397 2397 */ 2398 - if ((request_mask & (STATX_CTIME | STATX_MTIME | STATX_SIZE)) && 2398 + if ((request_mask & (STATX_CTIME | STATX_MTIME | STATX_SIZE | STATX_BLOCKS)) && 2399 2399 !CIFS_CACHE_READ(CIFS_I(inode)) && 2400 2400 inode->i_mapping && inode->i_mapping->nrpages != 0) { 2401 2401 rc = filemap_fdatawait(inode->i_mapping); ··· 2585 2585 if (rc == 0) { 2586 2586 cifsInode->server_eof = attrs->ia_size; 2587 2587 cifs_setsize(inode, attrs->ia_size); 2588 + /* 2589 + * i_blocks is not related to (i_size / i_blksize), but instead 2590 + * 512 byte (2**9) size is required for calculating num blocks. 2591 + * Until we can query the server for actual allocation size, 2592 + * this is best estimate we have for blocks allocated for a file 2593 + * Number of blocks must be rounded up so size 1 is not 0 blocks 2594 + */ 2595 + inode->i_blocks = (512 - 1 + attrs->ia_size) >> 9; 2588 2596 2589 2597 /* 2590 2598 * The man page of truncate says if the size changed,
+6 -1
fs/cifs/transport.c
··· 1196 1196 /* 1197 1197 * Compounding is never used during session establish. 1198 1198 */ 1199 - if ((ses->status == CifsNew) || (optype & CIFS_NEG_OP) || (optype & CIFS_SESS_OP)) 1199 + if ((ses->status == CifsNew) || (optype & CIFS_NEG_OP) || (optype & CIFS_SESS_OP)) { 1200 + mutex_lock(&server->srv_mutex); 1200 1201 smb311_update_preauth_hash(ses, rqst[0].rq_iov, 1201 1202 rqst[0].rq_nvec); 1203 + mutex_unlock(&server->srv_mutex); 1204 + } 1202 1205 1203 1206 for (i = 0; i < num_rqst; i++) { 1204 1207 rc = wait_for_response(server, midQ[i]); ··· 1269 1266 .iov_base = resp_iov[0].iov_base, 1270 1267 .iov_len = resp_iov[0].iov_len 1271 1268 }; 1269 + mutex_lock(&server->srv_mutex); 1272 1270 smb311_update_preauth_hash(ses, &iov, 1); 1271 + mutex_unlock(&server->srv_mutex); 1273 1272 } 1274 1273 1275 1274 out: