Commit d66016c5 authored by Linus Torvalds's avatar Linus Torvalds
Browse files

Merge tag '5.19-rc-smb3-client-fixes-part2' of git://git.samba.org/sfrench/cifs-2.6

Pull cifs client fixes from Steve French:
 "Nine cifs/smb3 client fixes.

  Includes DFS fixes, some cleanup of leagcy SMB1 code, duplicated
  message cleanup and a double free and deadlock fix"

* tag '5.19-rc-smb3-client-fixes-part2' of git://git.samba.org/sfrench/cifs-2.6:
  cifs: fix uninitialized pointer in error case in dfs_cache_get_tgt_share
  cifs: skip trailing separators of prefix paths
  cifs: update internal module number
  cifs: version operations for smb20 unneeded when legacy support disabled
  cifs: do not build smb1ops if legacy support is disabled
  cifs: fix potential deadlock in direct reclaim
  cifs: when extending a file with falloc we should make files not-sparse
  cifs: remove repeated debug message on cifs_put_smb_ses()
  cifs: fix potential double free during failed mount
parents d0e60d46 ee3c8019
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -8,7 +8,7 @@ obj-$(CONFIG_CIFS) += cifs.o
cifs-y := trace.o cifsfs.o cifssmb.o cifs_debug.o connect.o dir.o file.o \
	  inode.o link.o misc.o netmisc.o smbencrypt.o transport.o \
	  cifs_unicode.o nterr.o cifsencrypt.o \
	  readdir.o ioctl.o sess.o export.o smb1ops.o unc.o winucase.o \
	  readdir.o ioctl.o sess.o export.o unc.o winucase.o \
	  smb2ops.o smb2maperror.o smb2transport.o \
	  smb2misc.o smb2pdu.o smb2inode.o smb2file.o cifsacl.o fs_context.o \
	  dns_resolve.o cifs_spnego_negtokeninit.asn1.o asn1.o
@@ -30,3 +30,5 @@ cifs-$(CONFIG_CIFS_FSCACHE) += fscache.o
cifs-$(CONFIG_CIFS_SMB_DIRECT) += smbdirect.o

cifs-$(CONFIG_CIFS_ROOT) += cifsroot.o

cifs-$(CONFIG_CIFS_ALLOW_INSECURE_LEGACY) += smb1ops.o
+2 −2
Original line number Diff line number Diff line
@@ -465,7 +465,7 @@ static int cifs_swn_reconnect(struct cifs_tcon *tcon, struct sockaddr_storage *a
	int ret = 0;

	/* Store the reconnect address */
	mutex_lock(&tcon->ses->server->srv_mutex);
	cifs_server_lock(tcon->ses->server);
	if (cifs_sockaddr_equal(&tcon->ses->server->dstaddr, addr))
		goto unlock;

@@ -501,7 +501,7 @@ static int cifs_swn_reconnect(struct cifs_tcon *tcon, struct sockaddr_storage *a
	cifs_signal_cifsd_for_reconnect(tcon->ses->server, false);

unlock:
	mutex_unlock(&tcon->ses->server->srv_mutex);
	cifs_server_unlock(tcon->ses->server);

	return ret;
}
+4 −4
Original line number Diff line number Diff line
@@ -236,9 +236,9 @@ int cifs_verify_signature(struct smb_rqst *rqst,
					cpu_to_le32(expected_sequence_number);
	cifs_pdu->Signature.Sequence.Reserved = 0;

	mutex_lock(&server->srv_mutex);
	cifs_server_lock(server);
	rc = cifs_calc_signature(rqst, server, what_we_think_sig_should_be);
	mutex_unlock(&server->srv_mutex);
	cifs_server_unlock(server);

	if (rc)
		return rc;
@@ -626,7 +626,7 @@ setup_ntlmv2_rsp(struct cifs_ses *ses, const struct nls_table *nls_cp)

	memcpy(ses->auth_key.response + baselen, tiblob, tilen);

	mutex_lock(&ses->server->srv_mutex);
	cifs_server_lock(ses->server);

	rc = cifs_alloc_hash("hmac(md5)",
			     &ses->server->secmech.hmacmd5,
@@ -678,7 +678,7 @@ setup_ntlmv2_rsp(struct cifs_ses *ses, const struct nls_table *nls_cp)
		cifs_dbg(VFS, "%s: Could not generate md5 hash\n", __func__);

unlock:
	mutex_unlock(&ses->server->srv_mutex);
	cifs_server_unlock(ses->server);
setup_ntlmv2_rsp_ret:
	kfree(tiblob);

+6 −4
Original line number Diff line number Diff line
@@ -838,7 +838,7 @@ cifs_smb3_do_mount(struct file_system_type *fs_type,
	      int flags, struct smb3_fs_context *old_ctx)
{
	int rc;
	struct super_block *sb;
	struct super_block *sb = NULL;
	struct cifs_sb_info *cifs_sb = NULL;
	struct cifs_mnt_data mnt_data;
	struct dentry *root;
@@ -934,10 +934,12 @@ cifs_smb3_do_mount(struct file_system_type *fs_type,
	return root;
out:
	if (cifs_sb) {
		if (!sb || IS_ERR(sb)) {  /* otherwise kill_sb will handle */
			kfree(cifs_sb->prepath);
			smb3_cleanup_fs_context(cifs_sb->ctx);
			kfree(cifs_sb);
		}
	}
	return root;
}

+3 −2
Original line number Diff line number Diff line
@@ -152,6 +152,7 @@ extern struct dentry *cifs_smb3_do_mount(struct file_system_type *fs_type,
extern const struct export_operations cifs_export_ops;
#endif /* CONFIG_CIFS_NFSD_EXPORT */

#define SMB3_PRODUCT_BUILD 35
#define CIFS_VERSION   "2.36"
/* when changing internal version - update following two lines at same time */
#define SMB3_PRODUCT_BUILD 37
#define CIFS_VERSION   "2.37"
#endif				/* _CIFSFS_H */
Loading