* [PATCH] CIFS: fix sha512 check in cifs_crypto_secmech_release
@ 2018-02-19 17:11 Gustavo A. R. Silva
2018-02-19 17:27 ` Aurélien Aptel
0 siblings, 1 reply; 4+ messages in thread
From: Gustavo A. R. Silva @ 2018-02-19 17:11 UTC (permalink / raw)
To: Steve French, Aurelien Aptel
Cc: linux-cifs, samba-technical, linux-kernel, Gustavo A. R. Silva
It seems this is a copy-paste error and that the proper variable to use
in this particular case is _sha512_ instead of _md5_.
Addresses-Coverity-ID: 1465358 ("Copy-paste error")
Fixes: 1c6614d229e7 ("CIFS: add sha512 secmech")
Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
---
fs/cifs/cifsencrypt.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/cifs/cifsencrypt.c b/fs/cifs/cifsencrypt.c
index 6fa6d45..a6ef088 100644
--- a/fs/cifs/cifsencrypt.c
+++ b/fs/cifs/cifsencrypt.c
@@ -829,7 +829,7 @@ cifs_crypto_secmech_release(struct TCP_Server_Info *server)
server->secmech.md5 = NULL;
}
- if (server->secmech.md5) {
+ if (server->secmech.sha512) {
crypto_free_shash(server->secmech.sha512);
server->secmech.sha512 = NULL;
}
--
2.7.4
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] CIFS: fix sha512 check in cifs_crypto_secmech_release
2018-02-19 17:11 [PATCH] CIFS: fix sha512 check in cifs_crypto_secmech_release Gustavo A. R. Silva
@ 2018-02-19 17:27 ` Aurélien Aptel
2018-02-19 18:13 ` Gustavo A. R. Silva
0 siblings, 1 reply; 4+ messages in thread
From: Aurélien Aptel @ 2018-02-19 17:27 UTC (permalink / raw)
To: Gustavo A. R. Silva, Steve French
Cc: linux-cifs, samba-technical, linux-kernel, Gustavo A. R. Silva
"Gustavo A. R. Silva" <gustavo@embeddedor.com> writes:
> It seems this is a copy-paste error and that the proper variable to use
> in this particular case is _sha512_ instead of _md5_.
*sigh* I re-read this a lot yet still missed it. Minor memory leak
fixed, good coverity catch and thanks for the fix!
Reviewed-by: Aurelien Aptel <aaptel@suse.com>
--
Aurélien Aptel / SUSE Labs Samba Team
GPG: 1839 CB5F 9F5B FB9B AA97 8C99 03C8 A49B 521B D5D3
SUSE Linux GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany
GF: Felix Imendörffer, Jane Smithard, Graham Norton, HRB 21284 (AG Nürnberg)
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] CIFS: fix sha512 check in cifs_crypto_secmech_release
2018-02-19 17:27 ` Aurélien Aptel
@ 2018-02-19 18:13 ` Gustavo A. R. Silva
2018-02-19 22:09 ` Steve French
0 siblings, 1 reply; 4+ messages in thread
From: Gustavo A. R. Silva @ 2018-02-19 18:13 UTC (permalink / raw)
To: Aurélien Aptel, Gustavo A. R. Silva, Steve French
Cc: linux-cifs, samba-technical, linux-kernel
Hi Aurélien,
On 02/19/2018 11:27 AM, Aurélien Aptel wrote:
> "Gustavo A. R. Silva" <gustavo@embeddedor.com> writes:
>> It seems this is a copy-paste error and that the proper variable to use
>> in this particular case is _sha512_ instead of _md5_.
>
> *sigh* I re-read this a lot yet still missed it. Minor memory leak
> fixed, good coverity catch and thanks for the fix!
>
> Reviewed-by: Aurelien Aptel <aaptel@suse.com>
>
Glad to help. Thanks for the review.
BTW I think this should be sent to stable too.
--
Gustavo
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] CIFS: fix sha512 check in cifs_crypto_secmech_release
2018-02-19 18:13 ` Gustavo A. R. Silva
@ 2018-02-19 22:09 ` Steve French
0 siblings, 0 replies; 4+ messages in thread
From: Steve French @ 2018-02-19 22:09 UTC (permalink / raw)
To: Gustavo A. R. Silva
Cc: Aurélien Aptel, Gustavo A. R. Silva, Steve French, CIFS,
samba-technical, LKML
merged into cifs-2.6.git for-next
On Mon, Feb 19, 2018 at 12:13 PM, Gustavo A. R. Silva
<garsilva@embeddedor.com> wrote:
> Hi Aurélien,
>
> On 02/19/2018 11:27 AM, Aurélien Aptel wrote:
>>
>> "Gustavo A. R. Silva" <gustavo@embeddedor.com> writes:
>>>
>>> It seems this is a copy-paste error and that the proper variable to use
>>> in this particular case is _sha512_ instead of _md5_.
>>
>>
>> *sigh* I re-read this a lot yet still missed it. Minor memory leak
>> fixed, good coverity catch and thanks for the fix!
>>
>> Reviewed-by: Aurelien Aptel <aaptel@suse.com>
>>
>
> Glad to help. Thanks for the review.
>
> BTW I think this should be sent to stable too.
> --
> Gustavo
>
> --
> 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] 4+ messages in thread
end of thread, other threads:[~2018-02-19 22:09 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-02-19 17:11 [PATCH] CIFS: fix sha512 check in cifs_crypto_secmech_release Gustavo A. R. Silva
2018-02-19 17:27 ` Aurélien Aptel
2018-02-19 18:13 ` Gustavo A. R. Silva
2018-02-19 22:09 ` Steve 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).