linux-stable/fs/cifs
Aurelien Aptel b327a717e5 CIFS: make IPC a regular tcon
* Remove ses->ipc_tid.
* Make IPC$ regular tcon.
* Add a direct pointer to it in ses->tcon_ipc.
* Distinguish PIPE tcon from IPC tcon by adding a tcon->pipe flag. All
  IPC tcons are pipes but not all pipes are IPC.
* All TreeConnect functions now cannot take a NULL tcon object.

The IPC tcon has the same lifetime as the session it belongs to. It is
created when the session is created and destroyed when the session is
destroyed.

Since no mounts directly refer to the IPC tcon, its refcount should
always be set to initialisation value (1). Thus we make sure
cifs_put_tcon() skips it.

If the mount request resulting in a new session being created requires
encryption, try to require it too for IPC.

* set SERVER_NAME_LENGTH to serverName actual size

The maximum length of an ipv6 string representation is defined in
INET6_ADDRSTRLEN as 45+1 for null but lets keep what we know works.

Signed-off-by: Aurelien Aptel <aaptel@suse.com>
Signed-off-by: Steve French <smfrench@gmail.com>
Reviewed-by: Pavel Shilovsky <pshilov@microsoft.com>
2018-01-26 17:03:00 -06:00
..
asn1.c [CIFS] cifs: Rename cERROR and cFYI to cifs_dbg 2013-05-04 22:17:23 -05:00
cache.c fscache: remove unused ->now_uncached callback 2017-09-06 17:27:26 -07:00
cifs_debug.c CIFS: SMBD: Add SMB Direct debug counters 2018-01-24 19:49:07 -06:00
cifs_debug.h lib: update single-char callers of strtobool() 2016-03-17 15:09:34 -07:00
cifs_dfs_ref.c CIFS: add build_path_from_dentry_optional_prefix() 2017-03-01 22:26:10 -06:00
cifs_fs_sb.h Rename superblock flags (MS_xyz -> SB_xyz) 2017-11-27 13:05:09 -08:00
cifs_ioctl.h Enable previous version support 2016-10-13 19:48:11 -05:00
cifs_spnego.c cifs: Create dedicated keyring for spnego operations 2016-05-19 21:56:30 -05:00
cifs_spnego.h
cifs_unicode.c [SMB3] Remove ifdef since SMB3 (and later) now STRONGLY preferred 2017-07-08 18:57:07 -05:00
cifs_unicode.h [SMB3] Remove ifdef since SMB3 (and later) now STRONGLY preferred 2017-07-08 18:57:07 -05:00
cifs_uniupr.h
cifsacl.c cifs: cifsacl: Use a temporary ops variable to reduce code length 2017-05-12 19:45:18 -05:00
cifsacl.h cifs: fix SID binary to string conversion 2012-12-11 11:48:49 -06:00
cifsencrypt.c fs: cifs: replace CURRENT_TIME by other appropriate apis 2017-05-08 17:15:15 -07:00
cifsfs.c CIFS: SMBD: Add rdma mount option 2018-01-24 19:49:05 -06:00
cifsfs.h Update version of cifs module 2017-09-17 23:10:48 -05:00
cifsglob.h CIFS: make IPC a regular tcon 2018-01-26 17:03:00 -06:00
cifspdu.h CIFS: move DFS response parsing out of SMB1 code 2017-03-01 22:26:10 -06:00
cifsproto.h cifs: Add smb2_send_recv 2018-01-24 19:49:04 -06:00
cifssmb.c CIFS: make IPC a regular tcon 2018-01-26 17:03:00 -06:00
connect.c CIFS: make IPC a regular tcon 2018-01-26 17:03:00 -06:00
dir.c cifs: check MaxPathNameComponentLength != 0 before using it 2017-10-30 02:11:38 -05:00
dns_resolve.c cifs: fix composing of mount options for DFS referrals 2013-05-24 13:08:31 -05:00
dns_resolve.h
export.c [CIFS] cifs: Rename cERROR and cFYI to cifs_dbg 2013-05-04 22:17:23 -05:00
file.c CIFS: SMBD: Upper layer performs SMB read via RDMA write through memory registration 2018-01-24 19:49:07 -06:00
fscache.c NFS client updates for Linux 3.13 2013-11-08 05:57:46 +09:00
fscache.h CIFS: FS-Cache: Uncache unread pages in cifs_readpages() before freeing them 2013-09-18 10:17:03 -05:00
inode.c CIFS: make IPC a regular tcon 2018-01-26 17:03:00 -06:00
ioctl.c [SMB3] Remove ifdef since SMB3 (and later) now STRONGLY preferred 2017-07-08 18:57:07 -05:00
Kconfig cifs: fix build errors for SMB_DIRECT 2018-01-24 19:49:06 -06:00
link.c [SMB3] Remove ifdef since SMB3 (and later) now STRONGLY preferred 2017-07-08 18:57:07 -05:00
Makefile CIFS: SMBD: Establish SMB Direct connection 2018-01-24 19:49:05 -06:00
misc.c [SMB3] Remove ifdef since SMB3 (and later) now STRONGLY preferred 2017-07-08 18:57:07 -05:00
netmisc.c cifs: small underflow in cnvrtDosUnixTm() 2017-05-02 14:57:34 -05:00
nterr.c
nterr.h
ntlmssp.h cifs: dynamic allocation of ntlmssp blob 2016-06-23 23:45:07 -05:00
readdir.c cifs: initialize file_info_lock 2017-01-14 14:58:29 -06:00
rfc1002pdu.h
sess.c smb2: Enforce sec= mount option 2017-03-02 23:13:37 -06:00
smb1ops.c CIFS: SMBD: Read correct returned data length for RDMA write (SMB read) I/O 2018-01-24 19:49:07 -06:00
smb2file.c CIFS: add use_ipc flag to SMB2_ioctl() 2017-03-01 22:26:11 -06:00
smb2glob.h CIFS: Separate SMB2 header structure 2017-02-01 16:46:34 -06:00
smb2inode.c Do not send SMB3 SET_INFO request if nothing is changing 2016-10-13 19:46:51 -05:00
smb2maperror.c cifs: handle large EA requests more gracefully in smb2+ 2017-10-18 11:52:39 -05:00
smb2misc.c cifs: remove rfc1002 header from smb2_oplock_break we get from server 2018-01-24 19:49:05 -06:00
smb2ops.c CIFS: SMBD: Read correct returned data length for RDMA write (SMB read) I/O 2018-01-24 19:49:07 -06:00
smb2pdu.c CIFS: make IPC a regular tcon 2018-01-26 17:03:00 -06:00
smb2pdu.h cifs: remove rfc1002 header from smb2_lease_ack 2018-01-24 19:49:05 -06:00
smb2proto.h cifs: handle large EA requests more gracefully in smb2+ 2017-10-18 11:52:39 -05:00
smb2status.h
smb2transport.c Fix encryption labels and lengths for SMB3.1.1 2017-10-18 11:52:39 -05:00
smbdirect.c CIFS: SMBD: work around gcc -Wmaybe-uninitialized warning 2018-01-24 19:49:07 -06:00
smbdirect.h CIFS: SMBD: Implement RDMA memory registration 2018-01-24 19:49:06 -06:00
smbencrypt.c cifs: Fix smbencrypt() to stop pointing a scatterlist at the stack 2016-12-14 01:44:16 -06:00
smberr.h
smbfsctl.h [SMB3] Send durable handle v2 contexts when use of persistent handles required 2015-11-03 09:26:27 -06:00
transport.c CIFS: SMBD: Upper layer sends data via RDMA send 2018-01-24 19:49:06 -06:00
winucase.c [CIFS] quiet sparse compile warning 2013-09-08 14:54:24 -05:00
xattr.c Rename superblock flags (MS_xyz -> SB_xyz) 2017-11-27 13:05:09 -08:00