CIFS: refactor crypto shash/sdesc allocation&free

commit 82fb82be05 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>
This commit is contained in:
Aurelien Aptel 2018-02-16 19:19:27 +01:00 • committed by Greg Kroah-Hartman
commit 0910e2804f
6 changed files with 93 additions and 173 deletions