Loading crypto/skcipher.c +8 −15 Original line number Diff line number Diff line Loading @@ -306,11 +306,14 @@ static int skcipher_walk_first(struct skcipher_walk *walk) return skcipher_walk_next(walk); } static int skcipher_walk_skcipher(struct skcipher_walk *walk, struct skcipher_request *req) int skcipher_walk_virt(struct skcipher_walk *walk, struct skcipher_request *req, bool atomic) { struct crypto_skcipher *tfm = crypto_skcipher_reqtfm(req); struct skcipher_alg *alg = crypto_skcipher_alg(tfm); int err = 0; might_sleep_if(req->base.flags & CRYPTO_TFM_REQ_MAY_SLEEP); walk->total = req->cryptlen; walk->nbytes = 0; Loading @@ -318,7 +321,7 @@ static int skcipher_walk_skcipher(struct skcipher_walk *walk, walk->oiv = req->iv; if (unlikely(!walk->total)) return 0; goto out; scatterwalk_start(&walk->in, req->src); scatterwalk_start(&walk->out, req->dst); Loading @@ -336,18 +339,8 @@ static int skcipher_walk_skcipher(struct skcipher_walk *walk, else walk->stride = alg->walksize; return skcipher_walk_first(walk); } int skcipher_walk_virt(struct skcipher_walk *walk, struct skcipher_request *req, bool atomic) { int err; might_sleep_if(req->base.flags & CRYPTO_TFM_REQ_MAY_SLEEP); err = skcipher_walk_skcipher(walk, req); err = skcipher_walk_first(walk); out: walk->flags &= atomic ? ~SKCIPHER_WALK_SLEEP : ~0; return err; Loading Loading
crypto/skcipher.c +8 −15 Original line number Diff line number Diff line Loading @@ -306,11 +306,14 @@ static int skcipher_walk_first(struct skcipher_walk *walk) return skcipher_walk_next(walk); } static int skcipher_walk_skcipher(struct skcipher_walk *walk, struct skcipher_request *req) int skcipher_walk_virt(struct skcipher_walk *walk, struct skcipher_request *req, bool atomic) { struct crypto_skcipher *tfm = crypto_skcipher_reqtfm(req); struct skcipher_alg *alg = crypto_skcipher_alg(tfm); int err = 0; might_sleep_if(req->base.flags & CRYPTO_TFM_REQ_MAY_SLEEP); walk->total = req->cryptlen; walk->nbytes = 0; Loading @@ -318,7 +321,7 @@ static int skcipher_walk_skcipher(struct skcipher_walk *walk, walk->oiv = req->iv; if (unlikely(!walk->total)) return 0; goto out; scatterwalk_start(&walk->in, req->src); scatterwalk_start(&walk->out, req->dst); Loading @@ -336,18 +339,8 @@ static int skcipher_walk_skcipher(struct skcipher_walk *walk, else walk->stride = alg->walksize; return skcipher_walk_first(walk); } int skcipher_walk_virt(struct skcipher_walk *walk, struct skcipher_request *req, bool atomic) { int err; might_sleep_if(req->base.flags & CRYPTO_TFM_REQ_MAY_SLEEP); err = skcipher_walk_skcipher(walk, req); err = skcipher_walk_first(walk); out: walk->flags &= atomic ? ~SKCIPHER_WALK_SLEEP : ~0; return err; Loading