Skip to content
Commit e4630f9f authored by Herbert Xu's avatar Herbert Xu
Browse files

[CRYPTO] blkcipher: Fix handling of kmalloc page straddling



The function blkcipher_get_spot tries to return a buffer of
the specified length that does not straddle a page.  It has
an off-by-one bug so it may advance a page unnecessarily.

What's worse, one of its callers doesn't provide a buffer
that's sufficiently long for this operation.

This patch fixes both problems.  Thanks to Bob Gilligan for
diagnosing this problem and providing a fix.

Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
parent b21010ed
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment