Commit 3d99347a authored by Linus Torvalds's avatar Linus Torvalds
Browse files

Merge tag 'v6.19-rc-part1-smb3-client-fixes' of git://git.samba.org/sfrench/cifs-2.6

Pull smb client updates from Steve French:

 - multichannel fixes, including enabling ability to change multichannel
   settings with remount

 - debugging improvements: adding additional tracepoints, improving log
   messages

 - cleanup, including restructuring some of the transport layer for the
   client to make it clearer, and cleanup of status code table to be
   more consistent with protocol documentation

 - fixes for reads that start beyond end of file use cases

 - fix to backoff reconnects to reduce reconnect storms

 - locking improvement for getting mid entries

 - fixes for missing status code error mappings

 - performance improvement for status code to error mappings

* tag 'v6.19-rc-part1-smb3-client-fixes' of git://git.samba.org/sfrench/cifs-2.6: (22 commits)
  smb/client: update some SMB2 status strings
  cifs: Remove dead function prototypes
  smb/client: add two elements to smb2_error_map_table array
  smb: rename to STATUS_SMB_NO_PREAUTH_INTEGRITY_HASH_OVERLAP
  smb/client: remove unused elements from smb2_error_map_table array
  smb/client: reduce loop count in map_smb2_to_linux_error() by half
  smb: client: Add tracepoint for krb5 auth
  smb: client: improve error message when creating SMB session
  smb: client: relax session and tcon reconnect attempts
  cifs: Fix handling of a beyond-EOF DIO/unbuffered read over SMB2
  cifs: client: allow changing multichannel mount options on remount
  cifs: Do some preparation prior to organising the function declarations
  cifs: Add a tracepoint to log EIO errors
  cifs: Don't need state locking in smb2_get_mid_entry()
  cifs: Remove the server pointer from smb_message
  cifs: Fix specification of function pointers
  cifs: Replace SendReceiveBlockingLock() with SendReceive() plus flags
  cifs: Clean up some places where an extra kvec[] was required for rfc1002
  cifs: Make smb1's SendReceive() wrap cifs_send_recv()
  cifs: Remove the RFC1002 header from smb_hdr
  ...
parents cb015814 d8f52650
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -176,7 +176,7 @@ int open_cached_dir(unsigned int xid, struct cifs_tcon *tcon,
	server = cifs_pick_channel(ses);

	if (!server->ops->new_lease_key)
		return -EIO;
		return smb_EIO(smb_eio_trace_no_lease_key);

	utf16_path = cifs_convert_path_to_utf16(path, cifs_sb);
	if (!utf16_path)
+7 −7
Original line number Diff line number Diff line
@@ -37,7 +37,7 @@ cifs_dump_mem(char *label, void *data, int length)
		       data, length, true);
}

void cifs_dump_detail(void *buf, struct TCP_Server_Info *server)
void cifs_dump_detail(void *buf, size_t buf_len, struct TCP_Server_Info *server)
{
#ifdef CONFIG_CIFS_DEBUG2
	struct smb_hdr *smb = buf;
@@ -45,7 +45,7 @@ void cifs_dump_detail(void *buf, struct TCP_Server_Info *server)
	cifs_dbg(VFS, "Cmd: %d Err: 0x%x Flags: 0x%x Flgs2: 0x%x Mid: %d Pid: %d Wct: %d\n",
		 smb->Command, smb->Status.CifsError, smb->Flags,
		 smb->Flags2, smb->Mid, smb->Pid, smb->WordCount);
	if (!server->ops->check_message(buf, server->total_read, server)) {
	if (!server->ops->check_message(buf, buf_len, server->total_read, server)) {
		cifs_dbg(VFS, "smb buf %p len %u\n", smb,
			 server->ops->calc_smb_size(smb));
	}
@@ -79,9 +79,9 @@ void cifs_dump_mids(struct TCP_Server_Info *server)
		cifs_dbg(VFS, "IsMult: %d IsEnd: %d\n",
			 mid_entry->multiRsp, mid_entry->multiEnd);
		if (mid_entry->resp_buf) {
			cifs_dump_detail(mid_entry->resp_buf, server);
			cifs_dump_mem("existing buf: ",
				mid_entry->resp_buf, 62);
			cifs_dump_detail(mid_entry->resp_buf,
					 mid_entry->response_pdu_len, server);
			cifs_dump_mem("existing buf: ", mid_entry->resp_buf, 62);
		}
	}
	spin_unlock(&server->mid_queue_lock);
@@ -1318,11 +1318,11 @@ static const struct proc_ops cifs_mount_params_proc_ops = {
};

#else
inline void cifs_proc_init(void)
void cifs_proc_init(void)
{
}

inline void cifs_proc_clean(void)
void cifs_proc_clean(void)
{
}
#endif /* PROC_FS */
+3 −3
Original line number Diff line number Diff line
@@ -15,10 +15,10 @@
#define pr_fmt(fmt) "CIFS: " fmt

void cifs_dump_mem(char *label, void *data, int length);
void cifs_dump_detail(void *buf, struct TCP_Server_Info *ptcp_info);
void cifs_dump_mids(struct TCP_Server_Info *);
void cifs_dump_detail(void *buf, size_t buf_len, struct TCP_Server_Info *server);
void cifs_dump_mids(struct TCP_Server_Info *server);
extern bool traceSMB;		/* flag which enables the function below */
void dump_smb(void *, int);
void dump_smb(void *buf, int smb_buf_length);
#define CIFS_INFO	0x01
#define CIFS_RC		0x02
#define CIFS_TIMER	0x04
+1 −0
Original line number Diff line number Diff line
@@ -159,6 +159,7 @@ cifs_get_spnego_key(struct cifs_ses *sesInfo,
	cifs_dbg(FYI, "key description = %s\n", description);
	scoped_with_creds(spnego_cred)
		spnego_key = request_key(&cifs_spnego_key_type, description, "");
	trace_smb3_kerberos_auth(server, sesInfo, PTR_ERR_OR_ZERO(spnego_key));

#ifdef CONFIG_CIFS_DEBUG2
	if (cifsFYI && !IS_ERR(spnego_key)) {
+0 −2
Original line number Diff line number Diff line
@@ -27,10 +27,8 @@ struct cifs_spnego_msg {
	uint8_t		data[];
};

#ifdef __KERNEL__
extern struct key_type cifs_spnego_key_type;
extern struct key *cifs_get_spnego_key(struct cifs_ses *sesInfo,
				       struct TCP_Server_Info *server);
#endif /* KERNEL */

#endif /* _CIFS_SPNEGO_H */
Loading