Message ID | 57D75ED7.7080602@huawei.com |
---|---|
State | New |
Headers | show |
diff --git a/crypto/blkcipher.c b/crypto/blkcipher.c index 0122bec..5389d40 100644 --- a/crypto/blkcipher.c +++ b/crypto/blkcipher.c @@ -240,12 +240,13 @@ static int blkcipher_walk_next(struct blkcipher_desc *desc, walk->flags |= BLKCIPHER_WALK_COPY; if (!walk->page) { walk->page = (void *)__get_free_page(GFP_ATOMIC); + walk->page = NULL; if (!walk->page) n = 0; } } - bsize = min(walk->walk_blocksize, n); + bsize = walk->walk_blocksize; n = scatterwalk_clamp(&walk->in, n); n = scatterwalk_clamp(&walk->out, n);