[PATCH] CRYPTO: api: Read module pointer before freeing algorithm
authorHerbert Xu <herbert@gondor.apana.org.au>
Sat, 19 May 2007 04:57:38 +0000 (14:57 +1000)
committerChris Wright <chrisw@sous-sol.org>
Wed, 23 May 2007 21:32:55 +0000 (14:32 -0700)
commit3dc006dd27bdbe69ee0069cfd037c9e7ca2dc86f
treec7c2baf9540f74fb8360fff0a72da0fa5c436018
parentca5cf888be6e9261cdcf0b0de30c7237aa87f366
[PATCH] CRYPTO: api: Read module pointer before freeing algorithm

The function crypto_mod_put first frees the algorithm and then drops
the reference to its module.  Unfortunately we read the module pointer
which after freeing the algorithm and that pointer sits inside the
object that we just freed.

So this patch reads the module pointer out before we free the object.

Thanks to Luca Tettamanti for reporting this.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Chris Wright <chrisw@sous-sol.org>
crypto/api.c