- 14 2月, 2022 1 次提交
-
-
由 Steve French 提交于
The conversion to the new API broke the snapshot mount option due to 32 vs. 64 bit type mismatch Fixes: 24e0a1ef ("cifs: switch to new mount api") Cc: stable@vger.kernel.org # 5.11+ Reported-by: <ruckajan10@gmail.com> Acked-by: NRonnie Sahlberg <lsahlber@redhat.com> Signed-off-by: NSteve French <stfrench@microsoft.com>
-
- 18 1月, 2022 1 次提交
-
-
由 Ronnie Sahlberg 提交于
RHBZ: 2008434 Some servers, such as Windows2016 have a very low number of concurrent mounts that they allow from each client. This can be a problem if you have a more than a handful (==3 in this case) of cifs entries in your fstab and cause a number of the mounts there to randomly fail. Add a global mutex and use it to serialize all mount attempts. Signed-off-by: NRonnie Sahlberg <lsahlber@redhat.com> Signed-off-by: NSteve French <stfrench@microsoft.com>
-
- 18 12月, 2021 1 次提交
-
-
由 Thiago Rafael Becker 提交于
mount.cifs can pass a device with multiple delimiters in it. This will cause rename(2) to fail with ENOENT. V2: - Make sanitize_path more readable. - Fix multiple delimiters between UNC and prepath. - Avoid a memory leak if a bad user starts putting a lot of delimiters in the path on purpose. BugLink: https://bugzilla.redhat.com/show_bug.cgi?id=2031200 Fixes: 24e0a1ef ("cifs: switch to new mount api") Cc: stable@vger.kernel.org # 5.11+ Acked-by: NRonnie Sahlberg <lsahlber@redhat.com> Signed-off-by: NThiago Rafael Becker <trbecker@gmail.com> Signed-off-by: NSteve French <stfrench@microsoft.com>
-
- 13 11月, 2021 1 次提交
-
-
由 Paulo Alcantara 提交于
Fix memory leak of smb3_fs_context_dup::server_hostname when parsing and duplicating fs contexts during mount(2) as reported by kmemleak: unreferenced object 0xffff888125715c90 (size 16): comm "mount.cifs", pid 3832, jiffies 4304535868 (age 190.094s) hex dump (first 16 bytes): 7a 65 6c 64 61 2e 74 65 73 74 00 6b 6b 6b 6b a5 zelda.test.kkkk. backtrace: [<ffffffff8168106e>] kstrdup+0x2e/0x60 [<ffffffffa027a362>] smb3_fs_context_dup+0x392/0x8d0 [cifs] [<ffffffffa0136353>] cifs_smb3_do_mount+0x143/0x1700 [cifs] [<ffffffffa02795e8>] smb3_get_tree+0x2e8/0x520 [cifs] [<ffffffff817a19aa>] vfs_get_tree+0x8a/0x2d0 [<ffffffff8181e3e3>] path_mount+0x423/0x1a10 [<ffffffff8181fbca>] __x64_sys_mount+0x1fa/0x270 [<ffffffff83ae364b>] do_syscall_64+0x3b/0x90 [<ffffffff83c0007c>] entry_SYSCALL_64_after_hwframe+0x44/0xae unreferenced object 0xffff888111deed20 (size 32): comm "mount.cifs", pid 3832, jiffies 4304536044 (age 189.918s) hex dump (first 32 bytes): 44 46 53 52 4f 4f 54 31 2e 5a 45 4c 44 41 2e 54 DFSROOT1.ZELDA.T 45 53 54 00 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b a5 EST.kkkkkkkkkkk. backtrace: [<ffffffff8168118d>] kstrndup+0x2d/0x90 [<ffffffffa027ab2e>] smb3_parse_devname+0x9e/0x360 [cifs] [<ffffffffa01870c8>] cifs_setup_volume_info+0xa8/0x470 [cifs] [<ffffffffa018c469>] connect_dfs_target+0x309/0xc80 [cifs] [<ffffffffa018d6cb>] cifs_mount+0x8eb/0x17f0 [cifs] [<ffffffffa0136475>] cifs_smb3_do_mount+0x265/0x1700 [cifs] [<ffffffffa02795e8>] smb3_get_tree+0x2e8/0x520 [cifs] [<ffffffff817a19aa>] vfs_get_tree+0x8a/0x2d0 [<ffffffff8181e3e3>] path_mount+0x423/0x1a10 [<ffffffff8181fbca>] __x64_sys_mount+0x1fa/0x270 [<ffffffff83ae364b>] do_syscall_64+0x3b/0x90 [<ffffffff83c0007c>] entry_SYSCALL_64_after_hwframe+0x44/0xae Fixes: 7be3248f ("cifs: To match file servers, make sure the server hostname matches") Signed-off-by: NPaulo Alcantara (SUSE) <pc@cjr.nz> Signed-off-by: NSteve French <stfrench@microsoft.com>
-
- 09 11月, 2021 1 次提交
-
-
由 Shyam Prasad N 提交于
During the ntlmssp session setup (authenticate phases) send the client workstation info. This can make debugging easier on servers. Signed-off-by: NShyam Prasad N <sprasad@microsoft.com> Reviewed-by: NPaulo Alcantara (SUSE) <pc@cjr.nz> Reviewed-by: NEnzo Matsumiya <ematsumiya@suse.de> Signed-off-by: NSteve French <stfrench@microsoft.com>
-
- 03 11月, 2021 2 次提交
-
-
由 Steve French 提交于
Although corking and uncorking the socket (which cifs.ko already does) should usually have the desired benefit, using the new tcpnodelay mount option causes tcp_sock_set_nodelay() to be set on the socket which may be useful in order to ensure that we don't ever have cases where the network stack is waiting on sending an SMB request until multiple SMB requests have been added to the send queue (since this could lead to long latencies). To enable it simply append "tcpnodelay" it to the mount options Reviewed-by: NPaulo Alcantara (SUSE) <pc@cjr.nz> Signed-off-by: NSteve French <stfrench@microsoft.com>
-
由 Shyam Prasad N 提交于
We generally rely on a bunch of factors to differentiate between servers. For example, IP address, port etc. For certain server types (like Azure), it is important to make sure that the server hostname matches too, even if the both hostnames currently resolve to the same IP address. Signed-off-by: NShyam Prasad N <sprasad@microsoft.com> Cc: stable@vger.kernel.org Signed-off-by: NSteve French <stfrench@microsoft.com>
-
- 26 8月, 2021 2 次提交
-
-
由 Ronnie Sahlberg 提交于
for SMB1. This removes the dependency to DES. Signed-off-by: NRonnie Sahlberg <lsahlber@redhat.com> Signed-off-by: NSteve French <stfrench@microsoft.com>
-
由 Steve French 提交于
We were incorrectly initializing the posix extensions in the conversion to the new mount API. CC: <stable@vger.kernel.org> # 5.11+ Reported-by: NChristian Brauner <christian.brauner@ubuntu.com> Acked-by: NChristian Brauner <christian.brauner@ubuntu.com> Suggested-by: NNamjae Jeon <namjae.jeon@samsung.com> Signed-off-by: NSteve French <stfrench@microsoft.com>
-
- 29 7月, 2021 1 次提交
-
-
由 Ronnie Sahlberg 提交于
We lost parsing of backupuid in the switch to new mount API. Add it back. Signed-off-by: NRonnie Sahlberg <lsahlber@redhat.com> Reviewed-by: NShyam Prasad N <sprasad@microsoft.com> Cc: <stable@vger.kernel.org> # v5.11+ Reported-by: NXiaoli Feng <xifeng@redhat.com> Signed-off-by: NSteve French <stfrench@microsoft.com>
-
- 23 7月, 2021 1 次提交
-
-
由 Paulo Alcantara 提交于
When remouting a DFS share, force a new DFS referral of the path and if the currently cached targets do not match any of the new targets or there was no cached targets, then mark it for reconnect. For example: $ mount //dom/dfs/link /mnt -o username=foo,password=bar $ ls /mnt oldfile.txt change target share of 'link' in server settings $ mount /mnt -o remount,username=foo,password=bar $ ls /mnt newfile.txt Signed-off-by: NPaulo Alcantara (SUSE) <pc@cjr.nz> Signed-off-by: NSteve French <stfrench@microsoft.com>
-
- 09 7月, 2021 1 次提交
-
-
由 Ronnie Sahlberg 提交于
Use the nice helpers to initialize and the uid/gid/cred_uid when passed as mount arguments. Signed-off-by: NRonnie Sahlberg <lsahlber@redhat.com> Acked-by: NPavel Shilovsky <pshilovsky@samba.org> Signed-off-by: NSteve French <stfrench@microsoft.com>
-
- 20 5月, 2021 1 次提交
-
-
由 Jiapeng Chong 提交于
Eliminate the follow smatch warning: fs/cifs/fs_context.c:1148 smb3_fs_context_parse_param() warn: inconsistent indenting. Reported-by: NAbaci Robot <abaci@linux.alibaba.com> Signed-off-by: NJiapeng Chong <jiapeng.chong@linux.alibaba.com> Signed-off-by: NSteve French <stfrench@microsoft.com>
-
- 08 5月, 2021 1 次提交
-
-
由 Steve French 提交于
Mounting with "multichannel" is obviously implied if user requested more than one channel on mount (ie mount parm max_channels>1). Currently both have to be specified. Fix that so that if max_channels is greater than 1 on mount, enable multichannel rather than silently falling back to non-multichannel. Signed-off-by: NSteve French <stfrench@microsoft.com> Reviewed-By: NTom Talpey <tom@talpey.com> Cc: <stable@vger.kernel.org> # v5.11+ Reviewed-by: NShyam Prasad N <sprasad@microsoft.com>
-
- 05 5月, 2021 1 次提交
-
-
由 Paulo Alcantara 提交于
The commit 315db9a0 ("cifs: fix leak in cifs_smb3_do_mount() ctx") revealed an existing bug when mounting shares that contain a prefix path or DFS links. cifs_setup_volume_info() requires the @devname to contain the full path (UNC + prefix) to update the fs context with the new UNC and prepath values, however we were passing only the UNC path (old_ctx->UNC) in @device thus discarding any prefix paths. Instead of concatenating both old_ctx->{UNC,prepath} and pass it in @devname, just keep the dup'ed values of UNC and prepath in cifs_sb->ctx after calling smb3_fs_context_dup(), and fix smb3_parse_devname() to correctly parse and not leak the new UNC and prefix paths. Cc: <stable@vger.kernel.org> # v5.11+ Fixes: 315db9a0 ("cifs: fix leak in cifs_smb3_do_mount() ctx") Signed-off-by: NPaulo Alcantara (SUSE) <pc@cjr.nz> Acked-by: NDavid Disseldorp <ddiss@suse.de> Signed-off-by: NSteve French <stfrench@microsoft.com>
-
- 04 5月, 2021 1 次提交
-
-
由 Steve French 提交于
Various filesystem support the shutdown ioctl which is used by various xfstests. The shutdown ioctl sets a flag on the superblock which prevents open, unlink, symlink, hardlink, rmdir, create etc. on the file system until unmount and remounted. The two flags supported in this patch are: FSOP_GOING_FLAGS_LOGFLUSH and FSOP_GOING_FLAGS_NOLOGFLUSH which require very little other than blocking new operations (since we do not cache writes to metadata on the client with cifs.ko). FSOP_GOING_FLAGS_DEFAULT is not supported yet, but could be added in the future but would need to call syncfs or equivalent to write out pending data on the mount. With this patch various xfstests now work including tests 043 through 046 for example. Signed-off-by: NSteve French <stfrench@microsoft.com> Reviewed-by: NAurelien Aptel <aaptel@suse.com>
-
- 26 4月, 2021 4 次提交
-
-
由 Steve French 提交于
In some cases readahead of more than the read size can help (to allow parallel i/o of read ahead which can improve performance). Ceph introduced a mount parameter "rasize" to allow controlling this. Add mount parameter "rasize" to allow control of amount of readahead requested of the server. If rasize not set, rasize defaults to negotiated rsize as before. Reviewed-by: NShyam Prasad N <sprasad@microsoft.com> Signed-off-by: NSteve French <stfrench@microsoft.com>
-
由 Aurelien Aptel 提交于
This makes the errors accessible from userspace via dmesg and the fs_context fd. Signed-off-by: NAurelien Aptel <aaptel@suse.com> Signed-off-by: NSteve French <stfrench@microsoft.com>
-
由 Aurelien Aptel 提交于
Add fs_context param to parsing helpers to be able to log into it in next patch. Make some helper static as they are not used outside of fs_context.c Signed-off-by: NAurelien Aptel <aaptel@suse.com> Signed-off-by: NSteve French <stfrench@microsoft.com>
-
由 Al Viro 提交于
strndup(s, strlen(s)) is a highly unidiomatic way to spell strdup(s); it's *NOT* safer in any way, since strlen() is just as sensitive to NUL-termination as strdup() is. strndup() is for situations when you need a copy of a known-sized substring, not a magic security juju to drive the bad spirits away. Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk> Signed-off-by: NSteve French <stfrench@microsoft.com>
-
- 19 3月, 2021 1 次提交
-
-
由 Aurelien Aptel 提交于
If CONFIG_CIFS_ROOT is not set, rootfs mount option is invalid Signed-off-by: NAurelien Aptel <aaptel@suse.com> CC: <stable@vger.kernel.org> # v5.11 Signed-off-by: NSteve French <stfrench@microsoft.com>
-
- 26 2月, 2021 3 次提交
-
-
由 Ronnie Sahlberg 提交于
Passwords can contain ',' which are also used as the separator between mount options. Mount.cifs will escape all ',' characters as the string ",,". Update parsing of the mount options to detect ",," and treat it as a single 'c' character. Fixes: 24e0a1ef ("cifs: switch to new mount api") Cc: stable@vger.kernel.org # 5.11 Reported-by: NSimon Taylor <simon@simon-taylor.me.uk> Tested-by: NSimon Taylor <simon@simon-taylor.me.uk> Signed-off-by: NRonnie Sahlberg <lsahlber@redhat.com> Signed-off-by: NSteve French <stfrench@microsoft.com>
-
由 Steve French 提交于
The new optional mount parameter "acregmax" allows a different timeout for file metadata ("acdirmax" now allows controlling timeout for directory metadata). Setting "actimeo" still works as before, and changes timeout for both files and directories, but specifying "acregmax" or "acdirmax" allows overriding the default more granularly which can be a big performance benefit on some workloads. "acregmax" is already used by NFS as a mount parameter (albeit with a larger default and thus looser caching). Suggested-by: NTom Talpey <tom@talpey.com> Reviewed-By: NTom Talpey <tom@talpey.com> Reviewed-by: NRonnie Sahlberg <lsahlber@redhat.com> Signed-off-by: NSteve French <stfrench@microsoft.com>
-
由 Steve French 提交于
nfs and cifs on Linux currently have a mount parameter "actimeo" to control metadata (attribute) caching but cifs does not have additional mount parameters to allow distinguishing between caching directory metadata (e.g. needed to revalidate paths) and that for files. Add new mount parameter "acdirmax" to allow caching metadata for directories more loosely than file data. NFS adjusts metadata caching from acdirmin to acdirmax (and another two mount parms for files) but to reduce complexity, it is safer to just introduce the one mount parm to allow caching directories longer. The defaults for acdirmax and actimeo (for cifs.ko) are conservative, 1 second (NFS defaults acdirmax to 60 seconds). For many workloads, setting acdirmax to a higher value is safe and will improve performance. This patch leaves unchanged the default values for caching metadata for files and directories but gives the user more flexibility in adjusting them safely for their workload via the new mount parm. Signed-off-by: NSteve French <stfrench@microsoft.com> Reviewed-by: NRonnie Sahlberg <lsahlber@redhat.com> Reviewed-By: NTom Talpey <tom@talpey.com>
-
- 16 2月, 2021 1 次提交
-
-
由 Steve French 提交于
SMB3.1.1 is the newest, and preferred dialect, and is included in the requested dialect list by default (ie if no vers= is specified on mount) but it should also be requested if SMB3 or later is requested (vers=3 instead of a specific dialect: vers=2.1, vers=3.02 or vers=3.0). Currently specifying "vers=3" only requests smb3.0 and smb3.02 but this patch fixes it to also request smb3.1.1 dialect, as it is the newest and most secure dialect and is a "version 3 or later" dialect (the intent of "vers=3"). Signed-off-by: NSteve French <stfrench@microsoft.com> Suggested-by: NPavel Shilovsky <pshilov@microsoft.com> Reviewed-by: NShyam Prasad N <sprasad@microsoft.com> Reviewed-by: NPavel Shilovsky <pshilov@microsoft.com> Signed-off-by: NSteve French <stfrench@microsoft.com>
-
- 12 2月, 2021 1 次提交
-
-
由 Ronnie Sahlberg 提交于
so we no longer need to handle or parse the UNC= and prefixpath= options that mount.cifs are generating. This also fixes a bug in the mount command option where the devname would be truncated into just //server/share because we were looking at the truncated UNC value and not the full path. I.e. in the mount command output the devive //server/share/path would show up as just //server/share Signed-off-by: NRonnie Sahlberg <lsahlber@redhat.com> Reviewed-by: NShyam Prasad N <nspmangalore@gmail.com> Signed-off-by: NSteve French <stfrench@microsoft.com>
-
- 10 2月, 2021 1 次提交
-
-
由 Ronnie Sahlberg 提交于
Fixes small regression in implementation of new mount API. Signed-off-by: NRonnie Sahlberg <lsahlber@redhat.com> Reported-by: NHyunchul Lee <hyc.lee@gmail.com> Tested-by: NHyunchul Lee <hyc.lee@gmail.com> Signed-off-by: NSteve French <stfrench@microsoft.com>
-
- 29 1月, 2021 3 次提交
-
-
由 Ronnie Sahlberg 提交于
The new mount API requires additional changes to how DFS is handled. Additional testing of DFS uncovered problems with domain based DFS referrals (a follow on patch addresses DFS links) which this patch addresses. Signed-off-by: NRonnie Sahlberg <lsahlber@redhat.com> Signed-off-by: NPaulo Alcantara (SUSE) <pc@cjr.nz> Signed-off-by: NSteve French <stfrench@microsoft.com>
-
由 Steve French 提交于
During additional testing of the updated cifs.ko with the new mount API support, we found a few additional cases where we were logging errors, but not returning them to the user. For example: a) invalid security mechanisms b) invalid cache options c) unsupported rdma d) invalid smb dialect requested Fixes: 24e0a1ef ("cifs: switch to new mount api") Acked-by: NRonnie Sahlberg <lsahlber@redhat.com> Signed-off-by: NSteve French <stfrench@microsoft.com>
-
由 Steve French 提交于
The "prefixpath" mount option needs to be ignored which was missed in the recent conversion to the new mount API (prefixpath would be set by the mount helper if mounting a subdirectory of the root of a share e.g. //server/share/subdir) Fixes: 24e0a1ef ("cifs: switch to new mount api") Suggested-by: NRonnie Sahlberg <lsahlber@redhat.com> Signed-off-by: NSteve French <stfrench@microsoft.com> Reviewed-by: NRonnie Sahlberg <lsahlber@redhat.com>
-
- 28 1月, 2021 1 次提交
-
-
由 Adam Harvey 提交于
In 24e0a1ef, the noauto and auto options were missed when migrating to the new mount API. As a result, users with noauto in their fstab mount options are now unable to mount cifs filesystems, as they'll receive an "Unknown parameter" error. This restores the old behaviour of ignoring noauto and auto if they're given. Fixes: 24e0a1ef ("cifs: switch to new mount api") Signed-off-by: NAdam Harvey <adam@adamharvey.name> Reviewed-by: NRonnie Sahlberg <lsahlber@redhat.com> Signed-off-by: NSteve French <stfrench@microsoft.com>
-
- 14 1月, 2021 1 次提交
-
-
由 Menglong Dong 提交于
'rc' in smb3_fs_context_dup is not used and can be removed. Signed-off-by: NMenglong Dong <dong.menglong@zte.com.cn> Reviewed-by: NAurelien Aptel <aaptel@suse.com> Signed-off-by: NSteve French <stfrench@microsoft.com>
-
- 17 12月, 2020 2 次提交
-
-
由 Steve French 提交于
When remounting with the new mount API, we need to set rsize and wsize to the previous values if they are not passed in on the remount. Otherwise they get set to zero which breaks xfstest 452 for example. Signed-off-by: NSteve French <stfrench@microsoft.com> Reviewed-by: NRonnie Sahlberg <lsahlber@redhat.com> Reviewed-by: NShyam Prasad N <sprasad@microsoft.com>
-
由 Steve French 提交于
With the new mount API it can not handle empty strings for mount parms ("guest" is mapped in userspace mount helper to "user=") so we have to special case it as we do for the password mount parm. Signed-off-by: NSteve French <stfrench@microsoft.com> Reviewed-by: NRonnie Sahlberg <lsahlber@redhat.com>
-
- 16 12月, 2020 2 次提交
-
-
由 Steve French 提交于
The updates to the new mount API created aliases for some mount parms e.g. esize, idsfromsid, modefromsid, signloosely as "min_enc_offload", "setuidfromacl", "modesid", "ignore_signature" but did not add back in the original name expected by test cases and current users. It also had incorrect names for a few less used mount parms. Signed-off-by: NSteve French <stfrench@microsoft.com> Reviewed-by: NRonnie Sahlberg <lsahlber@redhat.com>
-
由 Steve French 提交于
warn_once when using the witness protocol that it is experimental Signed-off-by: NSteve French <stfrench@microsoft.com> Reviewed-by: NSamuel Cabrero <scabrero@suse.de> Reviewed-by: NShyam Prasad N <sprasad@microsoft.com>
-
- 15 12月, 2020 2 次提交
-
-
由 Ronnie Sahlberg 提交于
Addresses an issue noted by the kernel test robot Reported-by: Nkernel test robot <lkp@intel.com> Signed-off-by: NSteve French <stfrench@microsoft.com> Signed-off-by: NRonnie Sahlberg <lsahlber@redhat.com>
-
由 Ronnie Sahlberg 提交于
Many mount flags (e.g. for noperm, noxattr, nobrl, cifsacl, mfsymlinks and more) can be updated now. Signed-off-by: NRonnie Sahlberg <lsahlber@redhat.com> Signed-off-by: NSteve French <stfrench@microsoft.com>
-
- 14 12月, 2020 2 次提交
-
-
由 Ronnie Sahlberg 提交于
This function will set/clear flags that can be changed during mount or remount Signed-off-by: NRonnie Sahlberg <lsahlber@redhat.com> Signed-off-by: NSteve French <stfrench@microsoft.com>
-
由 Ronnie Sahlberg 提交于
Signed-off-by: NRonnie Sahlberg <lsahlber@redhat.com> Signed-off-by: NSteve French <stfrench@microsoft.com>
-