summaryrefslogtreecommitdiff
path: root/crypto/blkcipher.c
diff options
context:
space:
mode:
authorHerbert Xu <herbert@gondor.apana.org.au>2007-09-10 15:51:11 +0800
committerHerbert Xu <herbert@gondor.apana.org.au>2007-09-10 15:51:11 +0800
commit7385c71768c9642dad17c090ff294eb9e7db5e1a (patch)
tree50df94e4363b29eee17cfe7e290841875a449ddd /crypto/blkcipher.c
parenta25a77b56a664958c8c982ea8b2e31e7b366f10b (diff)
downloadlinux-crypto-7385c71768c9642dad17c090ff294eb9e7db5e1a.tar.gz
linux-crypto-7385c71768c9642dad17c090ff294eb9e7db5e1a.zip
[CRYPTO] blkcipher: Fix inverted test in blkcipher_get_spot
The previous patch had the conditional inverted. This patch fixes it so that we return the original position if it does not straddle a page. Thanks to Bob Gilligan for spotting this. Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'crypto/blkcipher.c')
-rw-r--r--crypto/blkcipher.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/crypto/blkcipher.c b/crypto/blkcipher.c
index 97586afb..d8f8ec32 100644
--- a/crypto/blkcipher.c
+++ b/crypto/blkcipher.c
@@ -65,7 +65,7 @@ static inline void blkcipher_unmap_dst(struct blkcipher_walk *walk)
static inline u8 *blkcipher_get_spot(u8 *start, unsigned int len)
{
u8 *end_page = (u8 *)(((unsigned long)(start + len - 1)) & PAGE_MASK);
- return start < end_page ? start : end_page;
+ return start > end_page ? start : end_page;
}
static inline unsigned int blkcipher_done_slow(struct crypto_blkcipher *tfm,