linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] smb: propagate error code of extract_sharename()
@ 2023-08-15 13:38 Katya Orlova
  2023-08-29 23:23 ` Steven French
  0 siblings, 1 reply; 2+ messages in thread
From: Katya Orlova @ 2023-08-15 13:38 UTC (permalink / raw)
  To: David Howells
  Cc: Katya Orlova, Jeff Layton, Steve French, Paulo Alcantara,
	Ronnie Sahlberg, linux-cifs, samba-technical, linux-kernel,
	lvc-project

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>
---
 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


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] smb: propagate error code of extract_sharename()
  2023-08-15 13:38 [PATCH] smb: propagate error code of extract_sharename() Katya Orlova
@ 2023-08-29 23:23 ` Steven French
  0 siblings, 0 replies; 2+ messages in thread
From: Steven French @ 2023-08-29 23:23 UTC (permalink / raw)
  To: Katya Orlova, David Howells
  Cc: Jeff Layton, Paulo Alcantara, Ronnie Sahlberg, linux-cifs,
	samba-technical, linux-kernel, lvc-project, Steve French

Merged into cifs-2.6.git for-next

On 8/15/23 08:38, Katya Orlova wrote:
> 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>
> ---
>   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);

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-08-29 23:24 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-08-15 13:38 [PATCH] smb: propagate error code of extract_sharename() Katya Orlova
2023-08-29 23:23 ` Steven French

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).