Skip to content

Commit efc0b0b

Browse files
Katya OrlovaSteve French
authored andcommitted
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: 70431bf ("cifs: Support fscache indexing rewrite") Signed-off-by: Katya Orlova <[email protected]> Signed-off-by: Steve French <[email protected]>
1 parent b97d64c commit efc0b0b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

fs/smb/client/fscache.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ int cifs_fscache_get_super_cookie(struct cifs_tcon *tcon)
4848
sharename = extract_sharename(tcon->tree_name);
4949
if (IS_ERR(sharename)) {
5050
cifs_dbg(FYI, "%s: couldn't extract sharename\n", __func__);
51-
return -EINVAL;
51+
return PTR_ERR(sharename);
5252
}
5353

5454
slen = strlen(sharename);

0 commit comments

Comments
 (0)