Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Merge git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6:
crypto: chainiv - Invoke completion function

+8 -2
+8 -2
crypto/chainiv.c
··· 117 117 static int async_chainiv_schedule_work(struct async_chainiv_ctx *ctx) 118 118 { 119 119 int queued; 120 + int err = ctx->err; 120 121 121 122 if (!ctx->queue.qlen) { 122 123 smp_mb__before_clear_bit(); ··· 132 131 BUG_ON(!queued); 133 132 134 133 out: 135 - return ctx->err; 134 + return err; 136 135 } 137 136 138 137 static int async_chainiv_postpone_request(struct skcipher_givcrypt_request *req) ··· 228 227 postponed); 229 228 struct skcipher_givcrypt_request *req; 230 229 struct ablkcipher_request *subreq; 230 + int err; 231 231 232 232 /* Only handle one request at a time to avoid hogging keventd. */ 233 233 spin_lock_bh(&ctx->lock); ··· 243 241 subreq = skcipher_givcrypt_reqctx(req); 244 242 subreq->base.flags |= CRYPTO_TFM_REQ_MAY_SLEEP; 245 243 246 - async_chainiv_givencrypt_tail(req); 244 + err = async_chainiv_givencrypt_tail(req); 245 + 246 + local_bh_disable(); 247 + skcipher_givcrypt_complete(req, err); 248 + local_bh_enable(); 247 249 } 248 250 249 251 static int async_chainiv_init(struct crypto_tfm *tfm)