Whamcloud - gitweb
LU-2053 crypto: Fix cfs_crypto_hash memleak
authorOleg Drokin <green@whamcloud.com>
Sat, 29 Sep 2012 20:15:40 +0000 (16:15 -0400)
committerOleg Drokin <green@whamcloud.com>
Mon, 1 Oct 2012 16:21:39 +0000 (12:21 -0400)
commitdebf6d265f2b35f86a18d17956fe3ea9a4b9d395
tree02e96219e642a605e119037dd09ea96a77c69266
parent1279a4e68f17e5406954d3592120dfa4ad9d6293
LU-2053 crypto: Fix cfs_crypto_hash memleak

Commit 353e3c2f8d9f195c0f87a16259f22b2f84de11d4 that introduced cryptoapi
support to Lustre is allocating a hdesc in cfs_crypto_hash_init and never
freeing it.
This function is called every time a checksum needs to be calculated,
so on every bulk RPC send or receive, so even though allocations are small,
they tend to still quickly consume all available memory with any significant
amount of IO.

Change-Id: Ic654c6102ea4306a81c1f7592c81cfb6e597f1f2
Signed-off-by: Oleg Drokin <green@whamcloud.com>
Reviewed-on: http://review.whamcloud.com/4135
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Alexander Boyko <alexander_boyko@xyratex.com>
libcfs/libcfs/linux/linux-crypto.c