[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20230815133831.3537-1-e.orlova@ispras.ru>
Date: Tue, 15 Aug 2023 16:38:31 +0300
From: Katya Orlova <e.orlova@...ras.ru>
To: David Howells <dhowells@...hat.com>
Cc: Katya Orlova <e.orlova@...ras.ru>,
Jeff Layton <jlayton@...nel.org>,
Steve French <sfrench@...ba.org>,
Paulo Alcantara <pc@...guebit.com>,
Ronnie Sahlberg <lsahlber@...hat.com>,
linux-cifs@...r.kernel.org, samba-technical@...ts.samba.org,
linux-kernel@...r.kernel.org, lvc-project@...uxtesting.org
Subject: [PATCH] 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@...ras.ru>
---
fs/smb/client/fscache.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/smb/client/fscache.c b/fs/smb/client/fscache.c
index 8f6909d633da..34e20c4cd507 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);
--
2.30.2
Powered by blists - more mailing lists