diff options
Diffstat (limited to 'kernel/crypto/scatterwalk.c')
-rw-r--r-- | kernel/crypto/scatterwalk.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/kernel/crypto/scatterwalk.c b/kernel/crypto/scatterwalk.c index ea5815c5e..bc769c448 100644 --- a/kernel/crypto/scatterwalk.c +++ b/kernel/crypto/scatterwalk.c @@ -72,7 +72,8 @@ static void scatterwalk_pagedone(struct scatter_walk *walk, int out, void scatterwalk_done(struct scatter_walk *walk, int out, int more) { - if (!(scatterwalk_pagelen(walk) & (PAGE_SIZE - 1)) || !more) + if (!more || walk->offset >= walk->sg->offset + walk->sg->length || + !(walk->offset & (PAGE_SIZE - 1))) scatterwalk_pagedone(walk, out, more); } EXPORT_SYMBOL_GPL(scatterwalk_done); |