Revision tags: v6.6.30, v6.6.29, v6.6.28, v6.6.27, v6.6.26, v6.6.25, v6.6.24 |
|
#
488d4cbc |
| 01-Apr-2024 |
Paulo Alcantara <pc@manguebit.com> |
smb: client: refresh referral without acquiring refpath_lock
[ Upstream commit 0a05ad21d77a188d06481c36d6016805a881bcc0 ]
Avoid refreshing DFS referral with refpath_lock acquired as the I/O could b
smb: client: refresh referral without acquiring refpath_lock
[ Upstream commit 0a05ad21d77a188d06481c36d6016805a881bcc0 ]
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: stable@vger.kernel.org # 6.4+ Signed-off-by: Paulo Alcantara (Red Hat) <pc@manguebit.com> Signed-off-by: Steve French <stfrench@microsoft.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
show more ...
|
#
645f332c |
| 01-Apr-2024 |
Paulo Alcantara <pc@manguebit.com> |
smb: client: guarantee refcounted children from parent session
[ Upstream commit 062a7f0ff46eb57aff526897bd2bebfdb1d3046a ]
Avoid potential use-after-free bugs when walking DFS referrals, mounting
smb: client: guarantee refcounted children from parent session
[ Upstream commit 062a7f0ff46eb57aff526897bd2bebfdb1d3046a ]
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: stable@vger.kernel.org # 6.4+ Reported-by: kernel test robot <lkp@intel.com> Closes: https://lore.kernel.org/oe-kbuild-all/202404021527.ZlRkIxgv-lkp@intel.com/ Signed-off-by: Paulo Alcantara (Red Hat) <pc@manguebit.com> Signed-off-by: Steve French <stfrench@microsoft.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
show more ...
|
Revision tags: v6.6.30, v6.6.29, v6.6.28, v6.6.27, v6.6.26, v6.6.25, v6.6.24 |
|
#
488d4cbc |
| 01-Apr-2024 |
Paulo Alcantara <pc@manguebit.com> |
smb: client: refresh referral without acquiring refpath_lock
[ Upstream commit 0a05ad21d77a188d06481c36d6016805a881bcc0 ]
Avoid refreshing DFS referral with refpath_lock acquired as the I/O could b
smb: client: refresh referral without acquiring refpath_lock
[ Upstream commit 0a05ad21d77a188d06481c36d6016805a881bcc0 ]
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: stable@vger.kernel.org # 6.4+ Signed-off-by: Paulo Alcantara (Red Hat) <pc@manguebit.com> Signed-off-by: Steve French <stfrench@microsoft.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
show more ...
|
#
645f332c |
| 01-Apr-2024 |
Paulo Alcantara <pc@manguebit.com> |
smb: client: guarantee refcounted children from parent session
[ Upstream commit 062a7f0ff46eb57aff526897bd2bebfdb1d3046a ]
Avoid potential use-after-free bugs when walking DFS referrals, mounting
smb: client: guarantee refcounted children from parent session
[ Upstream commit 062a7f0ff46eb57aff526897bd2bebfdb1d3046a ]
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: stable@vger.kernel.org # 6.4+ Reported-by: kernel test robot <lkp@intel.com> Closes: https://lore.kernel.org/oe-kbuild-all/202404021527.ZlRkIxgv-lkp@intel.com/ Signed-off-by: Paulo Alcantara (Red Hat) <pc@manguebit.com> Signed-off-by: Steve French <stfrench@microsoft.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
show more ...
|
Revision tags: v6.6.30, v6.6.29, v6.6.28, v6.6.27, v6.6.26, v6.6.25, v6.6.24 |
|
#
488d4cbc |
| 01-Apr-2024 |
Paulo Alcantara <pc@manguebit.com> |
smb: client: refresh referral without acquiring refpath_lock
[ Upstream commit 0a05ad21d77a188d06481c36d6016805a881bcc0 ]
Avoid refreshing DFS referral with refpath_lock acquired as the I/O could b
smb: client: refresh referral without acquiring refpath_lock
[ Upstream commit 0a05ad21d77a188d06481c36d6016805a881bcc0 ]
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: stable@vger.kernel.org # 6.4+ Signed-off-by: Paulo Alcantara (Red Hat) <pc@manguebit.com> Signed-off-by: Steve French <stfrench@microsoft.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
show more ...
|
#
645f332c |
| 01-Apr-2024 |
Paulo Alcantara <pc@manguebit.com> |
smb: client: guarantee refcounted children from parent session
[ Upstream commit 062a7f0ff46eb57aff526897bd2bebfdb1d3046a ]
Avoid potential use-after-free bugs when walking DFS referrals, mounting
smb: client: guarantee refcounted children from parent session
[ Upstream commit 062a7f0ff46eb57aff526897bd2bebfdb1d3046a ]
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: stable@vger.kernel.org # 6.4+ Reported-by: kernel test robot <lkp@intel.com> Closes: https://lore.kernel.org/oe-kbuild-all/202404021527.ZlRkIxgv-lkp@intel.com/ Signed-off-by: Paulo Alcantara (Red Hat) <pc@manguebit.com> Signed-off-by: Steve French <stfrench@microsoft.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
show more ...
|
Revision tags: v6.6.30, v6.6.29, v6.6.28, v6.6.27, v6.6.26, v6.6.25, v6.6.24 |
|
#
488d4cbc |
| 01-Apr-2024 |
Paulo Alcantara <pc@manguebit.com> |
smb: client: refresh referral without acquiring refpath_lock
[ Upstream commit 0a05ad21d77a188d06481c36d6016805a881bcc0 ]
Avoid refreshing DFS referral with refpath_lock acquired as the I/O could b
smb: client: refresh referral without acquiring refpath_lock
[ Upstream commit 0a05ad21d77a188d06481c36d6016805a881bcc0 ]
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: stable@vger.kernel.org # 6.4+ Signed-off-by: Paulo Alcantara (Red Hat) <pc@manguebit.com> Signed-off-by: Steve French <stfrench@microsoft.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
show more ...
|
#
645f332c |
| 01-Apr-2024 |
Paulo Alcantara <pc@manguebit.com> |
smb: client: guarantee refcounted children from parent session
[ Upstream commit 062a7f0ff46eb57aff526897bd2bebfdb1d3046a ]
Avoid potential use-after-free bugs when walking DFS referrals, mounting
smb: client: guarantee refcounted children from parent session
[ Upstream commit 062a7f0ff46eb57aff526897bd2bebfdb1d3046a ]
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: stable@vger.kernel.org # 6.4+ Reported-by: kernel test robot <lkp@intel.com> Closes: https://lore.kernel.org/oe-kbuild-all/202404021527.ZlRkIxgv-lkp@intel.com/ Signed-off-by: Paulo Alcantara (Red Hat) <pc@manguebit.com> Signed-off-by: Steve French <stfrench@microsoft.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
show more ...
|
Revision tags: v6.6.30, v6.6.29, v6.6.28, v6.6.27, v6.6.26, v6.6.25, v6.6.24 |
|
#
488d4cbc |
| 01-Apr-2024 |
Paulo Alcantara <pc@manguebit.com> |
smb: client: refresh referral without acquiring refpath_lock
[ Upstream commit 0a05ad21d77a188d06481c36d6016805a881bcc0 ]
Avoid refreshing DFS referral with refpath_lock acquired as the I/O could b
smb: client: refresh referral without acquiring refpath_lock
[ Upstream commit 0a05ad21d77a188d06481c36d6016805a881bcc0 ]
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: stable@vger.kernel.org # 6.4+ Signed-off-by: Paulo Alcantara (Red Hat) <pc@manguebit.com> Signed-off-by: Steve French <stfrench@microsoft.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
show more ...
|
#
645f332c |
| 01-Apr-2024 |
Paulo Alcantara <pc@manguebit.com> |
smb: client: guarantee refcounted children from parent session
[ Upstream commit 062a7f0ff46eb57aff526897bd2bebfdb1d3046a ]
Avoid potential use-after-free bugs when walking DFS referrals, mounting
smb: client: guarantee refcounted children from parent session
[ Upstream commit 062a7f0ff46eb57aff526897bd2bebfdb1d3046a ]
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: stable@vger.kernel.org # 6.4+ Reported-by: kernel test robot <lkp@intel.com> Closes: https://lore.kernel.org/oe-kbuild-all/202404021527.ZlRkIxgv-lkp@intel.com/ Signed-off-by: Paulo Alcantara (Red Hat) <pc@manguebit.com> Signed-off-by: Steve French <stfrench@microsoft.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
show more ...
|
Revision tags: v6.6.23, v6.6.16, v6.6.15, v6.6.14, v6.6.13, v6.6.12, v6.6.11, v6.6.10, v6.6.9, v6.6.8, v6.6.7, v6.6.6, v6.6.5, v6.6.4, v6.6.3, v6.6.2, v6.5.11, v6.6.1, v6.5.10, v6.6, v6.5.9, v6.5.8, v6.5.7, v6.5.6, v6.5.5, v6.5.4, v6.5.3, v6.5.2, v6.1.51, v6.5.1, v6.1.50, v6.5, v6.1.49, v6.1.48 |
|
#
ce04127c |
| 17-Aug-2023 |
Paulo Alcantara <pc@manguebit.com> |
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) <pc@manguebit.com> Signed-off-by: Steve French <stfrench@microsoft.com>
show more ...
|
#
3fea12f3 |
| 17-Aug-2023 |
Paulo Alcantara <pc@manguebit.com> |
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) <pc@manguebit.com> Signed-off-by: Steve French <stfrench@microsoft.com>
show more ...
|
Revision tags: v6.1.46, v6.1.45, v6.1.44, v6.1.43, v6.1.42, v6.1.41, v6.1.40, v6.1.39, v6.1.38, v6.1.37, v6.1.36 |
|
#
3ae872de |
| 26-Jun-2023 |
Paulo Alcantara <pc@manguebit.com> |
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) <pc@manguebit.com> Signed-off-by: Steve French <stfrench@microsoft.com>
show more ...
|
Revision tags: v6.4, v6.1.35, v6.1.34, v6.1.33, v6.1.32, v6.1.31, v6.1.30 |
|
#
38c8a9a5 |
| 21-May-2023 |
Steve French <stfrench@microsoft.com> |
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 <torvalds@linux-foundation.org> Acked-by: Namjae Jeon <linkinjeon@kernel.org> Signed-off-by: Steve French <stfrench@microsoft.com>
show more ...
|