diff options
author | Katya Orlova <e.orlova@ispras.ru> | 2023-08-15 15:38:31 +0200 |
---|---|---|
committer | Steve French <stfrench@microsoft.com> | 2023-08-31 06:38:49 +0200 |
commit | efc0b0bcffcba60d9c6301063d25a22a4744b499 (patch) | |
tree | d3064d0c428714baad455cf12bc164ed92549a4e /fs/smb | |
parent | Merge tag '6.6-rc-smb3-client-fixes-part1' of git://git.samba.org/sfrench/cif... (diff) | |
download | linux-efc0b0bcffcba60d9c6301063d25a22a4744b499.tar.xz linux-efc0b0bcffcba60d9c6301063d25a22a4744b499.zip |
smb: propagate error code of extract_sharename()
In addition to the EINVAL, there may be an ENOMEM.
Found by Linux Verification Center (linuxtesting.org) with SVACE.
Fixes: 70431bfd825d ("cifs: Support fscache indexing rewrite")
Signed-off-by: Katya Orlova <e.orlova@ispras.ru>
Signed-off-by: Steve French <stfrench@microsoft.com>
Diffstat (limited to 'fs/smb')
-rw-r--r-- | fs/smb/client/fscache.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/smb/client/fscache.c b/fs/smb/client/fscache.c index 3677525ee993..e5cad149f5a2 100644 --- a/fs/smb/client/fscache.c +++ b/fs/smb/client/fscache.c @@ -48,7 +48,7 @@ int cifs_fscache_get_super_cookie(struct cifs_tcon *tcon) sharename = extract_sharename(tcon->tree_name); if (IS_ERR(sharename)) { cifs_dbg(FYI, "%s: couldn't extract sharename\n", __func__); - return -EINVAL; + return PTR_ERR(sharename); } slen = strlen(sharename); |