- 23 1月, 2021 1 次提交
-
-
由 Ronnie Sahlberg 提交于
RHBZ 1848178 The original intent of returning an error in this function in the patch: "CIFS: Mask off signals when sending SMB packets" was to avoid interrupting packet send in the middle of sending the data (and thus breaking an SMB connection), but we also don't want to fail the request for non-fatal signals even before we have had a chance to try to send it (the reported problem could be reproduced e.g. by exiting a child process when the parent process was in the midst of calling futimens to update a file's timestamps). In addition, since the signal may remain pending when we enter the sending loop, we may end up not sending the whole packet before TCP buffers become full. In this case the code returns -EINTR but what we need here is to return -ERESTARTSYS instead to allow system calls to be restarted. Fixes: b30c74c7 ("CIFS: Mask off signals when sending SMB packets") Cc: stable@vger.kernel.org # v5.1+ Signed-off-by: NRonnie Sahlberg <lsahlber@redhat.com> Reviewed-by: NPavel Shilovsky <pshilov@microsoft.com> Signed-off-by: NSteve French <stfrench@microsoft.com>
-
- 18 1月, 2021 2 次提交
-
-
由 Jiapeng Zhong 提交于
Fix the follow warnings: ./fs/cifs/connect.c: WARNING: Comparison of 0/1 to bool variable Reported-by: NAbaci Robot <abaci@linux.alibaba.com> Signed-off-by: NJiapeng Zhong <abaci-bugfix@linux.alibaba.com> Signed-off-by: NSteve French <stfrench@microsoft.com>
-
由 Jiapeng Zhong 提交于
Fix the following coccicheck warnings: ./fs/cifs/connect.c:3386:2-21: WARNING: Assignment of 0/1 to bool variable. Reported-by: NAbaci Robot <abaci@linux.alibaba.com> Signed-off-by: NJiapeng Zhong <abaci-bugfix@linux.alibaba.com> Signed-off-by: NSteve French <stfrench@microsoft.com>
-
- 14 1月, 2021 5 次提交
-
-
由 YANG LI 提交于
There is a regular need in the kernel to provide a way to declare having a dynamically sized set of trailing elements in a structure. Kernel code should always use "flexible array members"[1] for these cases. The older style of one-element or zero-length arrays should no longer be used[2]. [1] https://en.wikipedia.org/wiki/Flexible_array_member [2] https://www.kernel.org/doc/html/v5.9/process/ deprecated.html#zero-length-and-one-element-arrays Signed-off-by: NYANG LI <abaci-bugfix@linux.alibaba.com> Reported-by: NAbaci <abaci@linux.alibaba.com> Signed-off-by: NSteve French <stfrench@microsoft.com>
-
由 YANG LI 提交于
Fix the following coccicheck warning: ./fs/cifs/connect.c:3740:6-21: WARNING: Comparison of 0/1 to bool variable Signed-off-by: NYANG LI <abaci-bugfix@linux.alibaba.com> Reported-by: Abaci Robot<abaci@linux.alibaba.com> Signed-off-by: NSteve French <stfrench@microsoft.com>
-
由 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>
-
由 Paulo Alcantara 提交于
Retry close command if it gets interrupted to not leak open handles on the server. Signed-off-by: NPaulo Alcantara (SUSE) <pc@cjr.nz> Reported-by: NDuncan Findlay <duncf@duncf.ca> Suggested-by: NPavel Shilovsky <pshilov@microsoft.com> Fixes: 6988a619 ("cifs: allow syscalls to be restarted in __smb_send_rqst()") Cc: stable@vger.kernel.org Reviewd-by: NPavel Shilovsky <pshilov@microsoft.com> Signed-off-by: NSteve French <stfrench@microsoft.com>
-
由 Tom Rix 提交于
clang static analysis reports this problem dfs_cache.c:591:2: warning: Argument to kfree() is a constant address (18446744073709551614), which is not memory allocated by malloc() kfree(vi); ^~~~~~~~~ In dfs_cache_del_vol() the volume info pointer 'vi' being freed is the return of a call to find_vol(). The large constant address is find_vol() returning an error. Add an error check to dfs_cache_del_vol() similar to the one done in dfs_cache_update_vol(). Fixes: 54be1f6c ("cifs: Add DFS cache routines") Signed-off-by: NTom Rix <trix@redhat.com> Reviewed-by: NNathan Chancellor <natechancellor@gmail.com> CC: <stable@vger.kernel.org> # v5.0+ Signed-off-by: NSteve French <stfrench@microsoft.com>
-
- 19 12月, 2020 2 次提交
-
-
由 Boris Protopopov 提交于
Fix passing of the additional security info via version operations. Force new open when getting SACL and avoid reuse of files that were previously open without sufficient privileges to access SACLs. Signed-off-by: NBoris Protopopov <pboris@amazon.com> Reviewed-by: NShyam Prasad N <sprasad@microsoft.com> Signed-off-by: NSteve French <stfrench@microsoft.com>
-
由 Boris Protopopov 提交于
Add SYSTEM_SECURITY access flag and use with smb2 when opening files for getting/setting SACLs. Add "system.cifs_ntsd_full" extended attribute to allow user-space access to the functionality. Avoid multiple server calls when setting owner, DACL, and SACL. Signed-off-by: NBoris Protopopov <pboris@amazon.com> Signed-off-by: NSteve French <stfrench@microsoft.com>
-
- 18 12月, 2020 4 次提交
-
-
由 Samuel Cabrero 提交于
The patch 7d6535b7: "cifs: Simplify reconnect code when dfs upcall is enabled" leads to the following static checker warning: fs/cifs/connect.c:160 reconn_set_next_dfs_target() error: 'server->hostname' dereferencing possible ERR_PTR() Avoid dereferencing the error pointer by early returning on error condition. Reported-by: NDan Carpenter <dan.carpenter@oracle.com> Signed-off-by: NSamuel Cabrero <scabrero@suse.de> Signed-off-by: NSteve French <stfrench@microsoft.com>
-
由 Dan Carpenter 提交于
This code is slightly nicer if we flip the cifs_sockaddr_equal() around and pull all the code in one tab. Signed-off-by: NDan Carpenter <dan.carpenter@oracle.com> Reviewed-by: NSamuel Cabrero <scabrero@suse.de> Signed-off-by: NSteve French <stfrench@microsoft.com>
-
由 Dan Carpenter 提交于
There are three error paths which need to unlock before returning. Fixes: 121d947d ("cifs: Handle witness client move notification") Signed-off-by: NDan Carpenter <dan.carpenter@oracle.com> Reviewed-by: NSamuel Cabrero <scabrero@suse.de> Signed-off-by: NSteve French <stfrench@microsoft.com>
-
由 Dan Carpenter 提交于
The unlock is done in the caller, this is a stray which leads to a double unlock bug. Fixes: bf80e5d4 ("cifs: Send witness register and unregister commands to userspace daemon") Signed-off-by: NDan Carpenter <dan.carpenter@oracle.com> Reviewed-by: NSamuel Cabrero <scabrero@suse.de> Signed-off-by: NSteve French <stfrench@microsoft.com>
-
- 17 12月, 2020 3 次提交
-
-
由 Steve French 提交于
To 2.30 Signed-off-by: NSteve French <stfrench@microsoft.com>
-
由 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 7 次提交
-
-
由 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>
-
由 Shyam Prasad N 提交于
There is at least one suspected bug in crediting changes in cifs.ko which has come up a few times in the discussions and in a customer case. This change adds tracepoints to the code which modifies the server credit values in any way. The goal is to be able to track the changes to the credit values of the session to be able to catch when there is a crediting bug. Signed-off-by: NShyam Prasad N <sprasad@microsoft.com> Signed-off-by: NSteve French <stfrench@microsoft.com>
-
由 Ronnie Sahlberg 提交于
Reported-by: NDan Carpenter <dan.carpenter@oracle.com> Signed-off-by: NRonnie Sahlberg <lsahlber@redhat.com> Signed-off-by: NSteve French <stfrench@microsoft.com>
-
由 Steve French 提交于
Also make sure these are displayed in /proc/mounts Signed-off-by: NSteve French <stfrench@microsoft.com> Reviewed-by: NRonnie Sahlberg <lsahlber@redhat.com>
-
由 Samuel Cabrero 提交于
* extract_hostname() and extract_sharename() never return NULL, so use IS_ERR() instead of IS_ERR_OR_NULL() in cifs_find_swn_reg(). If any of these functions return an error, then return an error pointer instead of NULL. * Change cifs_find_swn_reg() function to always return a valid pointer or an error pointer, instead of returning NULL if the registration is not found. * Finally update cifs_find_swn_reg() callers to check for -EEXIST instead of NULL. * In cifs_get_swn_reg() the swnreg idr mutex was not unlocked in the error path of cifs_find_swn_reg() call. Reported-by: NDan Carpenter <dan.carpenter@oracle.com> Signed-off-by: NSamuel Cabrero <scabrero@suse.de> Reviewed-by: NDan Carpenter <dan.carpenter@oracle.com> Signed-off-by: NSteve French <stfrench@microsoft.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>
-
由 Steve French 提交于
This is needed so that we display the correct //server/share vs \\server\share in /proc/mounts for the device name (in the new mount API). Signed-off-by: NSteve French <stfrench@microsoft.com> 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 14 次提交
-
-
由 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>
-
由 Ronnie Sahlberg 提交于
Signed-off-by: NRonnie Sahlberg <lsahlber@redhat.com> Signed-off-by: NSteve French <stfrench@microsoft.com>
-
由 Ronnie Sahlberg 提交于
There is no need to load the default nls to check if the iocharset argument was specified or not since we have it in cifs_sb->ctx Signed-off-by: NRonnie Sahlberg <lsahlber@redhat.com> Signed-off-by: NSteve French <stfrench@microsoft.com>
-
由 Ronnie Sahlberg 提交于
just use the one that is already available in ctx Signed-off-by: NRonnie Sahlberg <lsahlber@redhat.com> Signed-off-by: NSteve French <stfrench@microsoft.com>
-
由 Ronnie Sahlberg 提交于
Only load/unload local_nls from cifs_sb and just make the ctx contain a pointer to cifs_sb->ctx. 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>
-
由 Ronnie Sahlberg 提交于
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>
-
由 Ronnie Sahlberg 提交于
and rename it to smb3_cleanup_fs_context[_content] Signed-off-by: NRonnie Sahlberg <lsahlber@redhat.com> Signed-off-by: NSteve French <stfrench@microsoft.com>
-
由 Dmitry Osipenko 提交于
Add missing sentinel to smb3_fs_parameters. This fixes ARM32 kernel crashing once CIFS is registered. Unable to handle kernel paging request at virtual address 33626d73 ... (strcmp) from (fs_validate_description) (fs_validate_description) from (register_filesystem) (register_filesystem) from (init_cifs [cifs]) (init_cifs [cifs]) from (do_one_initcall) (do_one_initcall) from (do_init_module) (do_init_module) from (load_module) (load_module) from (sys_finit_module) (sys_finit_module) from (ret_fast_syscal) Fixes: e07724d1cf38 ("cifs: switch to new mount api") Signed-off-by: NDmitry Osipenko <digetx@gmail.com> Reviewed-by: NAurelien Aptel <aaptel@suse.com> Signed-off-by: NSteve French <stfrench@microsoft.com>
-
由 Samuel Cabrero 提交于
This message is sent to tell a client to close its current connection and connect to the specified address. Signed-off-by: NSamuel Cabrero <scabrero@suse.de> Reviewed-by: NAurelien Aptel <aaptel@suse.com> Signed-off-by: NSteve French <stfrench@microsoft.com>
-
由 Ronnie Sahlberg 提交于
Can now be accessed via the ctx Signed-off-by: NRonnie Sahlberg <lsahlber@redhat.com> Signed-off-by: NSteve French <stfrench@microsoft.com>
-
由 Ronnie Sahlberg 提交于
We can already access these from cifs_sb->ctx so we no longer need a local copy in cifs_sb. Signed-off-by: NRonnie Sahlberg <lsahlber@redhat.com> Signed-off-by: NSteve French <stfrench@microsoft.com>
-