Herbert Xu wrote:
> Hi Michal:
>
> On Mon, May 22, 2006 at 01:29:54AM +1200, Michal Ludvig wrote:
>> attached is an obvious fix for your "Pass TFM instead of CTX" patch.
>> Please apply to your GIT tree.
>
> Thanks for catching this. It looks like I missed the coa_init/coa_exit
> calls as well. Could you add that to your patch and resend?
Attached.
Michal
Fix a few omissions in passing TFM instead of CTX to algorithms.
Signed-off-by: Michal Ludvig <[EMAIL PROTECTED]>
Index: linux/crypto/digest.c
===================================================================
--- linux.orig/crypto/digest.c
+++ linux/crypto/digest.c
@@ -70,10 +70,10 @@ static void final(struct crypto_tfm *tfm
unsigned int size = crypto_tfm_alg_digestsize(tfm);
u8 buffer[size + alignmask];
u8 *dst = (u8 *)ALIGN((unsigned long)buffer, alignmask + 1);
- tfm->__crt_alg->cra_digest.dia_final(crypto_tfm_ctx(tfm), dst);
+ tfm->__crt_alg->cra_digest.dia_final(tfm, dst);
memcpy(out, dst, size);
} else
- tfm->__crt_alg->cra_digest.dia_final(crypto_tfm_ctx(tfm), out);
+ tfm->__crt_alg->cra_digest.dia_final(tfm, out);
}
static int setkey(struct crypto_tfm *tfm, const u8 *key, unsigned int keylen)
Index: linux/crypto/compress.c
===================================================================
--- linux.orig/crypto/compress.c
+++ linux/crypto/compress.c
@@ -44,7 +44,7 @@ int crypto_init_compress_ops(struct cryp
int ret = 0;
struct compress_tfm *ops = &tfm->crt_compress;
- ret = tfm->__crt_alg->cra_compress.coa_init(crypto_tfm_ctx(tfm));
+ ret = tfm->__crt_alg->cra_compress.coa_init(tfm);
if (ret)
goto out;
@@ -57,5 +57,5 @@ out:
void crypto_exit_compress_ops(struct crypto_tfm *tfm)
{
- tfm->__crt_alg->cra_compress.coa_exit(crypto_tfm_ctx(tfm));
+ tfm->__crt_alg->cra_compress.coa_exit(tfm);
}