CIFS: refactor crypto shash/sdesc allocation&free
authorAurelien Aptel <aaptel@suse.com>
Fri, 16 Feb 2018 18:19:27 +0000 (19:19 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 24 Apr 2018 07:36:27 +0000 (09:36 +0200)
commit0910e2804f2ecb081bd87c26cdb8f4ff502c39f2
tree328743f99a8e800d0333c2bf014d4246594dd8f0
parentfd5cc02cbef93b2391d295d81f16706fdc01bcea
CIFS: refactor crypto shash/sdesc allocation&free

commit 82fb82be05585426405667dd5f0510aa953ba439 upstream.

shash and sdesc and always allocated and freed together.
* abstract this in new functions cifs_alloc_hash() and cifs_free_hash().
* make smb2/3 crypto allocation independent from each other.

Signed-off-by: Aurelien Aptel <aaptel@suse.com>
Signed-off-by: Steve French <smfrench@gmail.com>
Reviewed-by: Ronnie Sahlberg <lsahlber@redhat.com>
CC: Stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/cifs/cifsencrypt.c
fs/cifs/cifsproto.h
fs/cifs/link.c
fs/cifs/misc.c
fs/cifs/smb2transport.c
fs/cifs/smbencrypt.c