Skip to content

Commit

Permalink
smb: propagate error code of extract_sharename()
Browse files Browse the repository at this point in the history
[ Upstream commit efc0b0b ]

In addition to the EINVAL, there may be an ENOMEM.

Found by Linux Verification Center (linuxtesting.org) with SVACE.

Fixes: 70431bf ("cifs: Support fscache indexing rewrite")
Signed-off-by: Katya Orlova <e.orlova@ispras.ru>
Signed-off-by: Steve French <stfrench@microsoft.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
  • Loading branch information
Katya Orlova authored and gregkh committed Sep 19, 2023
1 parent 60e3318 commit 47f72ee
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fs/smb/client/fscache.c
Expand Up @@ -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);
Expand Down

0 comments on commit 47f72ee

Please sign in to comment.