All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] cifs: Silence uninitialized variable warning
@ 2018-06-19 12:25 Dan Carpenter
  2018-06-19 13:12 ` Paulo Alcantara
  2018-06-19 21:32 ` Steve French
  0 siblings, 2 replies; 3+ messages in thread
From: Dan Carpenter @ 2018-06-19 12:25 UTC (permalink / raw)
  To: kernel-janitors

This is not really a runtime issue but Smatch complains that:

    fs/cifs/smb2ops.c:1740 smb2_query_symlink()
    error: uninitialized symbol 'resp_buftype'.

The warning is right that it can be uninitialized...  Also "err_buf"
would be NULL at this point and we're not supposed to pass NULLs to
free_rsp_buf() or it might trigger some extra output if we turn on
debugging.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

diff --git a/fs/cifs/smb2ops.c b/fs/cifs/smb2ops.c
index 0356b5559c71..5649cd3f377d 100644
--- a/fs/cifs/smb2ops.c
+++ b/fs/cifs/smb2ops.c
@@ -1697,7 +1697,7 @@ smb2_query_symlink(const unsigned int xid, struct cifs_tcon *tcon,
 		       &resp_buftype);
 	if (!rc || !err_iov.iov_base) {
 		rc = -ENOENT;
-		goto querty_exit;
+		goto free_path;
 	}
 
 	err_buf = err_iov.iov_base;
@@ -1738,6 +1738,7 @@ smb2_query_symlink(const unsigned int xid, struct cifs_tcon *tcon,
 
  querty_exit:
 	free_rsp_buf(resp_buftype, err_buf);
+ free_path:
 	kfree(utf16_path);
 	return rc;
 }

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

* Re: [PATCH] cifs: Silence uninitialized variable warning
  2018-06-19 12:25 [PATCH] cifs: Silence uninitialized variable warning Dan Carpenter
@ 2018-06-19 13:12 ` Paulo Alcantara
  2018-06-19 21:32 ` Steve French
  1 sibling, 0 replies; 3+ messages in thread
From: Paulo Alcantara @ 2018-06-19 13:12 UTC (permalink / raw)
  To: kernel-janitors

Dan Carpenter <dan.carpenter@oracle.com> writes:

> This is not really a runtime issue but Smatch complains that:
>
>     fs/cifs/smb2ops.c:1740 smb2_query_symlink()
>     error: uninitialized symbol 'resp_buftype'.
>
> The warning is right that it can be uninitialized...  Also "err_buf"
> would be NULL at this point and we're not supposed to pass NULLs to
> free_rsp_buf() or it might trigger some extra output if we turn on
> debugging.
>
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

Reviewed-by: Paulo Alcantara <palcantara@suse.de>

Thanks
Paulo

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

* Re: [PATCH] cifs: Silence uninitialized variable warning
  2018-06-19 12:25 [PATCH] cifs: Silence uninitialized variable warning Dan Carpenter
  2018-06-19 13:12 ` Paulo Alcantara
@ 2018-06-19 21:32 ` Steve French
  1 sibling, 0 replies; 3+ messages in thread
From: Steve French @ 2018-06-19 21:32 UTC (permalink / raw)
  To: kernel-janitors

merged into cifs-2.6.git for-next

On Tue, Jun 19, 2018 at 8:12 AM, Paulo Alcantara <paulo@paulo.ac> wrote:
> Dan Carpenter <dan.carpenter@oracle.com> writes:
>
>> This is not really a runtime issue but Smatch complains that:
>>
>>     fs/cifs/smb2ops.c:1740 smb2_query_symlink()
>>     error: uninitialized symbol 'resp_buftype'.
>>
>> The warning is right that it can be uninitialized...  Also "err_buf"
>> would be NULL at this point and we're not supposed to pass NULLs to
>> free_rsp_buf() or it might trigger some extra output if we turn on
>> debugging.
>>
>> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
>
> Reviewed-by: Paulo Alcantara <palcantara@suse.de>
>
> Thanks
> Paulo
> --
> To unsubscribe from this list: send the line "unsubscribe linux-cifs" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html



-- 
Thanks,

Steve

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

end of thread, other threads:[~2018-06-19 21:32 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-06-19 12:25 [PATCH] cifs: Silence uninitialized variable warning Dan Carpenter
2018-06-19 13:12 ` Paulo Alcantara
2018-06-19 21:32 ` Steve French

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.