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

Pull cifs fixes from Steve French:
"Six small smb3 client fixes, three for stable:

- fix for snapshot mount option

- two ACL related fixes

- use after free race fix

- fix for confusing warning message logged with older dialects"

* tag '5.17-rc5-smb3-fixes' of git://git.samba.org/sfrench/cifs-2.6:
cifs: fix confusing unneeded warning message on smb2.1 and earlier
cifs: modefromsids must add an ACE for authenticated users
cifs: fix double free race when mount fails in cifs_get_root()
cifs: do not use uninitialized data in the owner/group sid
cifs: fix set of group SID via NTSD xattrs
smb3: fix snapshot mount option

+17 -10
+6 -3
fs/cifs/cifsacl.c
··· 949 949 pnntace = (struct cifs_ace *) (nacl_base + nsize); 950 950 nsize += setup_special_mode_ACE(pnntace, nmode); 951 951 num_aces++; 952 + pnntace = (struct cifs_ace *) (nacl_base + nsize); 953 + nsize += setup_authusers_ACE(pnntace); 954 + num_aces++; 952 955 goto set_size; 953 956 } 954 957 ··· 1300 1297 1301 1298 if (uid_valid(uid)) { /* chown */ 1302 1299 uid_t id; 1303 - nowner_sid_ptr = kmalloc(sizeof(struct cifs_sid), 1300 + nowner_sid_ptr = kzalloc(sizeof(struct cifs_sid), 1304 1301 GFP_KERNEL); 1305 1302 if (!nowner_sid_ptr) { 1306 1303 rc = -ENOMEM; ··· 1329 1326 } 1330 1327 if (gid_valid(gid)) { /* chgrp */ 1331 1328 gid_t id; 1332 - ngroup_sid_ptr = kmalloc(sizeof(struct cifs_sid), 1329 + ngroup_sid_ptr = kzalloc(sizeof(struct cifs_sid), 1333 1330 GFP_KERNEL); 1334 1331 if (!ngroup_sid_ptr) { 1335 1332 rc = -ENOMEM; ··· 1616 1613 nsecdesclen = secdesclen; 1617 1614 if (pnmode && *pnmode != NO_CHANGE_64) { /* chmod */ 1618 1615 if (mode_from_sid) 1619 - nsecdesclen += sizeof(struct cifs_ace); 1616 + nsecdesclen += 2 * sizeof(struct cifs_ace); 1620 1617 else /* cifsacl */ 1621 1618 nsecdesclen += 5 * sizeof(struct cifs_ace); 1622 1619 } else { /* chown */
+1
fs/cifs/cifsfs.c
··· 919 919 920 920 out_super: 921 921 deactivate_locked_super(sb); 922 + return root; 922 923 out: 923 924 if (cifs_sb) { 924 925 kfree(cifs_sb->prepath);
+2 -2
fs/cifs/fs_context.c
··· 149 149 fsparam_u32("echo_interval", Opt_echo_interval), 150 150 fsparam_u32("max_credits", Opt_max_credits), 151 151 fsparam_u32("handletimeout", Opt_handletimeout), 152 - fsparam_u32("snapshot", Opt_snapshot), 152 + fsparam_u64("snapshot", Opt_snapshot), 153 153 fsparam_u32("max_channels", Opt_max_channels), 154 154 155 155 /* Mount options which take string value */ ··· 1078 1078 ctx->echo_interval = result.uint_32; 1079 1079 break; 1080 1080 case Opt_snapshot: 1081 - ctx->snapshot_time = result.uint_32; 1081 + ctx->snapshot_time = result.uint_64; 1082 1082 break; 1083 1083 case Opt_max_credits: 1084 1084 if (result.uint_32 < 20 || result.uint_32 > 60000) {
+6 -5
fs/cifs/sess.c
··· 127 127 struct cifs_server_iface *ifaces = NULL; 128 128 size_t iface_count; 129 129 130 - if (ses->server->dialect < SMB30_PROT_ID) { 131 - cifs_dbg(VFS, "multichannel is not supported on this protocol version, use 3.0 or above\n"); 132 - return 0; 133 - } 134 - 135 130 spin_lock(&ses->chan_lock); 136 131 137 132 new_chan_count = old_chan_count = ses->chan_count; ··· 137 142 cifs_dbg(FYI, 138 143 "ses already at max_channels (%zu), nothing to open\n", 139 144 ses->chan_max); 145 + return 0; 146 + } 147 + 148 + if (ses->server->dialect < SMB30_PROT_ID) { 149 + spin_unlock(&ses->chan_lock); 150 + cifs_dbg(VFS, "multichannel is not supported on this protocol version, use 3.0 or above\n"); 140 151 return 0; 141 152 } 142 153
+2
fs/cifs/xattr.c
··· 175 175 switch (handler->flags) { 176 176 case XATTR_CIFS_NTSD_FULL: 177 177 aclflags = (CIFS_ACL_OWNER | 178 + CIFS_ACL_GROUP | 178 179 CIFS_ACL_DACL | 179 180 CIFS_ACL_SACL); 180 181 break; 181 182 case XATTR_CIFS_NTSD: 182 183 aclflags = (CIFS_ACL_OWNER | 184 + CIFS_ACL_GROUP | 183 185 CIFS_ACL_DACL); 184 186 break; 185 187 case XATTR_CIFS_ACL: