]> git.ipfire.org Git - people/ms/linux.git/commit
dm crypt: fix kcryptd_async_done parameter
authorHuang Ying <ying.huang@intel.com>
Mon, 16 Mar 2009 17:44:33 +0000 (17:44 +0000)
committerGreg Kroah-Hartman <gregkh@suse.de>
Mon, 23 Mar 2009 21:55:26 +0000 (14:55 -0700)
commit82ba91e8544c4dc502dfa40c3d9e041c6907bf3d
tree4d7e40cfdd894a491345736bb458512c34f9b116
parent20b8b5c729f3f1152e046c807eeb61c23556d5a9
dm crypt: fix kcryptd_async_done parameter

commit b2174eebd1fadb76454dad09a1dacbc17081e6b0 upstream.

In the async encryption-complete function (kcryptd_async_done), the
crypto_async_request passed in may be different from the one passed to
crypto_ablkcipher_encrypt/decrypt.  Only crypto_async_request->data is
guaranteed to be same as the one passed in.  The current
kcryptd_async_done uses the passed-in crypto_async_request directly
which may cause the AES-NI-based AES algorithm implementation to panic.

This patch fixes this bug by only using crypto_async_request->data,
which points to dm_crypt_request, the crypto_async_request passed in.
The original data (convert_context) is gotten from dm_crypt_request.

[mbroz@redhat.com: reworked]
Signed-off-by: Huang Ying <ying.huang@intel.com>
Cc: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Milan Broz <mbroz@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/md/dm-crypt.c