|
Revision tags: v6.15, v6.15-rc7, v6.15-rc6, v6.15-rc5, v6.15-rc4, v6.15-rc3, v6.15-rc2, v6.15-rc1, v6.14, v6.14-rc7, v6.14-rc6, v6.14-rc5, v6.14-rc4, v6.14-rc3, v6.14-rc2 |
|
| #
be1963dd |
| 05-Feb-2025 |
Paulo Alcantara <[email protected]> |
smb: client: get rid of kstrdup() in get_ses_refpath()
After commit 36008fe6e3dc ("smb: client: don't try following DFS links in cifs_tree_connect()"), TCP_Server_Info::leaf_fullpath will no longer
smb: client: get rid of kstrdup() in get_ses_refpath()
After commit 36008fe6e3dc ("smb: client: don't try following DFS links in cifs_tree_connect()"), TCP_Server_Info::leaf_fullpath will no longer be changed, so there is no need to kstrdup() it.
Signed-off-by: Paulo Alcantara (Red Hat) <[email protected]> Signed-off-by: Steve French <[email protected]>
show more ...
|
|
Revision tags: v6.14-rc1, v6.13 |
|
| #
0a9b00e5 |
| 17-Jan-2025 |
Paulo Alcantara <[email protected]> |
smb: client: get rid of TCP_Server_Info::refpath_lock
TCP_Server_Info::leaf_fullpath is allocated in cifs_get_tcp_session() and never changed afterwards, so there is no need to serialize its access.
smb: client: get rid of TCP_Server_Info::refpath_lock
TCP_Server_Info::leaf_fullpath is allocated in cifs_get_tcp_session() and never changed afterwards, so there is no need to serialize its access.
Signed-off-by: Paulo Alcantara (Red Hat) <[email protected]> Signed-off-by: Steve French <[email protected]>
show more ...
|
|
Revision tags: v6.13-rc7 |
|
| #
4b1b4c8b |
| 07-Jan-2025 |
Paulo Alcantara <[email protected]> |
smb: client: provide dns_resolve_{unc,name} helpers
Some places pass hostnames rather than UNC paths to resolve them to ip addresses, so provide helpers to handle both cases and then stop converting
smb: client: provide dns_resolve_{unc,name} helpers
Some places pass hostnames rather than UNC paths to resolve them to ip addresses, so provide helpers to handle both cases and then stop converting hostnames to UNC paths by inserting path delimiters into them. Also kill @expiry parameter as it's not used anywhere.
Signed-off-by: Paulo Alcantara (Red Hat) <[email protected]> Signed-off-by: Steve French <[email protected]>
show more ...
|
|
Revision tags: v6.13-rc6 |
|
| #
ad46faff |
| 03-Jan-2025 |
Paulo Alcantara <[email protected]> |
smb: client: fix DFS mount against old servers with NTLMSSP
Old Windows servers will return not fully qualified DFS targets by default as specified in
MS-DFSC 3.2.5.5 Receiving a Root Referral Re
smb: client: fix DFS mount against old servers with NTLMSSP
Old Windows servers will return not fully qualified DFS targets by default as specified in
MS-DFSC 3.2.5.5 Receiving a Root Referral Request or Link Referral Request
| Servers SHOULD<30> return fully qualified DNS host names of | targets in responses to root referral requests and link referral | requests. | ... | <30> Section 3.2.5.5: By default, Windows Server 2003, Windows | Server 2008, Windows Server 2008 R2, Windows Server 2012, and | Windows Server 2012 R2 return DNS host names that are not fully | qualified for targets.
Fix this by converting all NetBIOS host names from DFS targets to FQDNs and try resolving them first if DNS domain name was provided in NTLMSSP CHALLENGE_MESSAGE message from previous SMB2_SESSION_SETUP. This also prevents the client from translating the DFS target hostnames to another domain depending on the network domain search order.
Signed-off-by: Paulo Alcantara (Red Hat) <[email protected]> Signed-off-by: Steve French <[email protected]>
show more ...
|
|
Revision tags: v6.13-rc5, v6.13-rc4, v6.13-rc3, v6.13-rc2, v6.13-rc1 |
|
| #
28ec614f |
| 26-Nov-2024 |
Paulo Alcantara <[email protected]> |
smb: client: allow more DFS referrals to be cached
In some DFS setups, a single DFS share may contain hundreds of DFS links and increasing the DFS cache to allow more referrals to be cached improves
smb: client: allow more DFS referrals to be cached
In some DFS setups, a single DFS share may contain hundreds of DFS links and increasing the DFS cache to allow more referrals to be cached improves DFS failover as the client will likely find a cached DFS referral when reconnecting and then avoiding unnecessary remounts.
Signed-off-by: Paulo Alcantara (Red Hat) <[email protected]> Signed-off-by: Steve French <[email protected]>
show more ...
|
|
Revision tags: v6.12 |
|
| #
7460bf44 |
| 12-Nov-2024 |
Thorsten Blum <[email protected]> |
smb: client: Use str_yes_no() helper function
Remove hard-coded strings by using the str_yes_no() helper function.
Signed-off-by: Thorsten Blum <[email protected]> Signed-off-by: Steve French
smb: client: Use str_yes_no() helper function
Remove hard-coded strings by using the str_yes_no() helper function.
Signed-off-by: Thorsten Blum <[email protected]> Signed-off-by: Steve French <[email protected]>
show more ...
|
|
Revision tags: v6.12-rc7, v6.12-rc6, v6.12-rc5, v6.12-rc4, v6.12-rc3, v6.12-rc2, v6.12-rc1 |
|
| #
4f42a8b5 |
| 18-Sep-2024 |
Paulo Alcantara <[email protected]> |
smb: client: fix DFS interlink failover
The DFS interlinks point to different DFS namespaces so make sure to use the correct DFS root server to chase any DFS links under it by storing the SMB sessio
smb: client: fix DFS interlink failover
The DFS interlinks point to different DFS namespaces so make sure to use the correct DFS root server to chase any DFS links under it by storing the SMB session in dfs_ref_walk structure and then using it on every referral walk.
Signed-off-by: Paulo Alcantara (Red Hat) <[email protected]> Signed-off-by: Steve French <[email protected]>
show more ...
|
| #
9190cc0c |
| 18-Sep-2024 |
Paulo Alcantara <[email protected]> |
smb: client: improve purging of cached referrals
Purge cached referrals that have a single target when reaching maximum of cache size as the client won't need them to failover. Otherwise remove old
smb: client: improve purging of cached referrals
Purge cached referrals that have a single target when reaching maximum of cache size as the client won't need them to failover. Otherwise remove oldest cache entry.
Signed-off-by: Paulo Alcantara (Red Hat) <[email protected]> Signed-off-by: Steve French <[email protected]>
show more ...
|
| #
242d23ef |
| 18-Sep-2024 |
Paulo Alcantara <[email protected]> |
smb: client: avoid unnecessary reconnects when refreshing referrals
Do not mark tcons for reconnect when current connection matches any of the targets returned by new referral even when there is no
smb: client: avoid unnecessary reconnects when refreshing referrals
Do not mark tcons for reconnect when current connection matches any of the targets returned by new referral even when there is no cached entry.
Signed-off-by: Paulo Alcantara (Red Hat) <[email protected]> Signed-off-by: Steve French <[email protected]>
show more ...
|
|
Revision tags: v6.11, v6.11-rc7, v6.11-rc6, v6.11-rc5, v6.11-rc4, v6.11-rc3, v6.11-rc2, v6.11-rc1, v6.10, v6.10-rc7, v6.10-rc6, v6.10-rc5, v6.10-rc4, v6.10-rc3, v6.10-rc2, v6.10-rc1, v6.9, v6.9-rc7, v6.9-rc6, v6.9-rc5, v6.9-rc4, v6.9-rc3 |
|
| #
0a05ad21 |
| 02-Apr-2024 |
Paulo Alcantara <[email protected]> |
smb: client: refresh referral without acquiring refpath_lock
Avoid refreshing DFS referral with refpath_lock acquired as the I/O could block for a while due to a potentially disconnected or slow DFS
smb: client: refresh referral without acquiring refpath_lock
Avoid refreshing DFS referral with refpath_lock acquired as the I/O could block for a while due to a potentially disconnected or slow DFS root server and then making other threads - that use same @server and don't require a DFS root server - unable to make any progress.
Cc: [email protected] # 6.4+ Signed-off-by: Paulo Alcantara (Red Hat) <[email protected]> Signed-off-by: Steve French <[email protected]>
show more ...
|
| #
062a7f0f |
| 02-Apr-2024 |
Paulo Alcantara <[email protected]> |
smb: client: guarantee refcounted children from parent session
Avoid potential use-after-free bugs when walking DFS referrals, mounting and performing DFS failover by ensuring that all children from
smb: client: guarantee refcounted children from parent session
Avoid potential use-after-free bugs when walking DFS referrals, mounting and performing DFS failover by ensuring that all children from parent @tcon->ses are also refcounted. They're all needed across the entire DFS mount. Get rid of @tcon->dfs_ses_list while we're at it, too.
Cc: [email protected] # 6.4+ Reported-by: kernel test robot <[email protected]> Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/ Signed-off-by: Paulo Alcantara (Red Hat) <[email protected]> Signed-off-by: Steve French <[email protected]>
show more ...
|
|
Revision tags: v6.9-rc2, v6.9-rc1, v6.8, v6.8-rc7, v6.8-rc6, v6.8-rc5, v6.8-rc4, v6.8-rc3, v6.8-rc2, v6.8-rc1, v6.7, v6.7-rc8, v6.7-rc7, v6.7-rc6, v6.7-rc5, v6.7-rc4, v6.7-rc3, v6.7-rc2, v6.7-rc1, v6.6, v6.6-rc7, v6.6-rc6, v6.6-rc5, v6.6-rc4, v6.6-rc3, v6.6-rc2, v6.6-rc1, v6.5, v6.5-rc7 |
|
| #
ce04127c |
| 17-Aug-2023 |
Paulo Alcantara <[email protected]> |
smb: client: ensure to try all targets when finding nested links
With current implementation, when a nested DFS link is found during mount(2), the client follows the referral and then try to connect
smb: client: ensure to try all targets when finding nested links
With current implementation, when a nested DFS link is found during mount(2), the client follows the referral and then try to connect to all of its targets. If all targets failed, the client bails out rather than retrying remaining targets from previous referral.
Fix this by stacking all referrals and targets so the client can retry remaining targets from previous referrals in case all targets of current referral have failed.
Thanks to samba, this can be easily tested like below
* Run the following under dfs folder in samba server
$ ln -s "msdfs:srv\\bad-share" link1 $ ln -s "msdfs:srv\\dfs\\link1,srv\\good-share" link0
* Before patch
$ mount.cifs //srv/dfs/link0 /mnt -o ... mount error(2): No such file or directory Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)...
* After patch
$ mount.cifs //srv/dfs/link0 /mnt -o ... # ls /mnt bar fileshare1 sub
Signed-off-by: Paulo Alcantara (SUSE) <[email protected]> Signed-off-by: Steve French <[email protected]>
show more ...
|
| #
3fea12f3 |
| 17-Aug-2023 |
Paulo Alcantara <[email protected]> |
smb: client: introduce DFS_CACHE_TGT_LIST()
Add new helper which declares and initialises target list of a DFS referral rather having to do both separately.
No functional changes.
Signed-off-by: P
smb: client: introduce DFS_CACHE_TGT_LIST()
Add new helper which declares and initialises target list of a DFS referral rather having to do both separately.
No functional changes.
Signed-off-by: Paulo Alcantara (SUSE) <[email protected]> Signed-off-by: Steve French <[email protected]>
show more ...
|
|
Revision tags: v6.5-rc6, v6.5-rc5, v6.5-rc4, v6.5-rc3, v6.5-rc2, v6.5-rc1 |
|
| #
3ae872de |
| 26-Jun-2023 |
Paulo Alcantara <[email protected]> |
smb: client: fix shared DFS root mounts with different prefixes
When having two DFS root mounts that are connected to same namespace, same mount options but different prefix paths, we can't really u
smb: client: fix shared DFS root mounts with different prefixes
When having two DFS root mounts that are connected to same namespace, same mount options but different prefix paths, we can't really use the shared @server->origin_fullpath when chasing DFS links in them.
Move the origin_fullpath field to cifs_tcon structure so when having shared DFS root mounts with different prefix paths, and we need to chase any DFS links, dfs_get_automount_devname() will pick up the correct full path out of the @tcon that will be used for the new mount.
Before patch
mount.cifs //dom/dfs/dir /mnt/1 -o ... mount.cifs //dom/dfs /mnt/2 -o ... # shared server, ses, tcon # server: origin_fullpath=//dom/dfs/dir
# @server->origin_fullpath + '/dir/link1' $ ls /mnt/2/dir/link1 ls: cannot open directory '/mnt/2/dir/link1': No such file or directory
After patch
mount.cifs //dom/dfs/dir /mnt/1 -o ... mount.cifs //dom/dfs /mnt/2 -o ... # shared server & ses # tcon_1: origin_fullpath=//dom/dfs/dir # tcon_2: origin_fullpath=//dom/dfs
# @tcon_2->origin_fullpath + '/dir/link1' $ ls /mnt/2/dir/link1 dir0 dir1 dir10 dir3 dir5 dir6 dir7 dir9 target2_file.txt tsub
Fixes: 8e3554150d6c ("cifs: fix sharing of DFS connections") Signed-off-by: Paulo Alcantara (SUSE) <[email protected]> Signed-off-by: Steve French <[email protected]>
show more ...
|
|
Revision tags: v6.4, v6.4-rc7, v6.4-rc6, v6.4-rc5, v6.4-rc4 |
|
| #
38c8a9a5 |
| 22-May-2023 |
Steve French <[email protected]> |
smb: move client and server files to common directory fs/smb
Move CIFS/SMB3 related client and server files (cifs.ko and ksmbd.ko and helper modules) to new fs/smb subdirectory:
fs/cifs --> fs/s
smb: move client and server files to common directory fs/smb
Move CIFS/SMB3 related client and server files (cifs.ko and ksmbd.ko and helper modules) to new fs/smb subdirectory:
fs/cifs --> fs/smb/client fs/ksmbd --> fs/smb/server fs/smbfs_common --> fs/smb/common
Suggested-by: Linus Torvalds <[email protected]> Acked-by: Namjae Jeon <[email protected]> Signed-off-by: Steve French <[email protected]>
show more ...
|