X-Git-Url: http://pileus.org/git/?a=blobdiff_plain;f=crypto%2Fblkcipher.c;h=a8d85a1d670e14dd388a1a38c03f25b80f61436e;hb=99427747fbd0b29f2bebc74c697acfd435fecc3f;hp=1e61d1a888b2b76f1b1e2fc8ac67e7741b221f45;hpb=d97055e62dd8c6f2150b6062ffbd4a6d836658ff;p=~andy%2Flinux diff --git a/crypto/blkcipher.c b/crypto/blkcipher.c index 1e61d1a888b..a8d85a1d670 100644 --- a/crypto/blkcipher.c +++ b/crypto/blkcipher.c @@ -43,22 +43,22 @@ static int blkcipher_walk_first(struct blkcipher_desc *desc, static inline void blkcipher_map_src(struct blkcipher_walk *walk) { - walk->src.virt.addr = scatterwalk_map(&walk->in, 0); + walk->src.virt.addr = scatterwalk_map(&walk->in); } static inline void blkcipher_map_dst(struct blkcipher_walk *walk) { - walk->dst.virt.addr = scatterwalk_map(&walk->out, 1); + walk->dst.virt.addr = scatterwalk_map(&walk->out); } static inline void blkcipher_unmap_src(struct blkcipher_walk *walk) { - scatterwalk_unmap(walk->src.virt.addr, 0); + scatterwalk_unmap(walk->src.virt.addr); } static inline void blkcipher_unmap_dst(struct blkcipher_walk *walk) { - scatterwalk_unmap(walk->dst.virt.addr, 1); + scatterwalk_unmap(walk->dst.virt.addr); } /* Get a spot of the specified length that does not straddle a page. @@ -508,9 +508,9 @@ static int crypto_blkcipher_report(struct sk_buff *skb, struct crypto_alg *alg) rblkcipher.max_keysize = alg->cra_blkcipher.max_keysize; rblkcipher.ivsize = alg->cra_blkcipher.ivsize; - NLA_PUT(skb, CRYPTOCFGA_REPORT_BLKCIPHER, - sizeof(struct crypto_report_blkcipher), &rblkcipher); - + if (nla_put(skb, CRYPTOCFGA_REPORT_BLKCIPHER, + sizeof(struct crypto_report_blkcipher), &rblkcipher)) + goto nla_put_failure; return 0; nla_put_failure: