X-Git-Url: http://pilppa.org/gitweb/?a=blobdiff_plain;f=crypto%2Fblkcipher.c;h=b5befe8c3a96ee1a4c73b708823b76a2f9bb06bc;hb=0979c84b4affaf924a894380dd0069638b64de03;hp=034c939bf91a2a26cabcbc836f508bbf283e911f;hpb=6585b572402e5ec7936422123b44b65fef7a5ea6;p=linux-2.6-omap-h63xx.git diff --git a/crypto/blkcipher.c b/crypto/blkcipher.c index 034c939bf91..b5befe8c3a9 100644 --- a/crypto/blkcipher.c +++ b/crypto/blkcipher.c @@ -16,8 +16,8 @@ #include #include +#include #include -#include #include #include #include @@ -314,6 +314,9 @@ static int blkcipher_walk_first(struct blkcipher_desc *desc, struct crypto_blkcipher *tfm = desc->tfm; unsigned int alignmask = crypto_blkcipher_alignmask(tfm); + if (WARN_ON_ONCE(in_irq())) + return -EDEADLK; + walk->nbytes = walk->total; if (unlikely(!walk->total)) return 0; @@ -346,7 +349,8 @@ static int setkey(struct crypto_tfm *tfm, const u8 *key, return cipher->setkey(tfm, key, keylen); } -static unsigned int crypto_blkcipher_ctxsize(struct crypto_alg *alg) +static unsigned int crypto_blkcipher_ctxsize(struct crypto_alg *alg, u32 type, + u32 mask) { struct blkcipher_alg *cipher = &alg->cra_blkcipher; unsigned int len = alg->cra_ctxsize; @@ -359,7 +363,7 @@ static unsigned int crypto_blkcipher_ctxsize(struct crypto_alg *alg) return len; } -static int crypto_init_blkcipher_ops(struct crypto_tfm *tfm) +static int crypto_init_blkcipher_ops(struct crypto_tfm *tfm, u32 type, u32 mask) { struct blkcipher_tfm *crt = &tfm->crt_blkcipher; struct blkcipher_alg *alg = &tfm->__crt_alg->cra_blkcipher;