projects
/
firefly-linux-kernel-4.4.55.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
crypto: scatterwalk - Fix test in scatterwalk_done
[firefly-linux-kernel-4.4.55.git]
/
crypto
/
scatterwalk.c
diff --git
a/crypto/scatterwalk.c
b/crypto/scatterwalk.c
index ea5815c5e12817912e1749d6aaf1a84606d7e7f3..bc769c448d4a9829c0733ca3adbd1dc04bd5afec 100644
(file)
--- a/
crypto/scatterwalk.c
+++ b/
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)
{
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);
scatterwalk_pagedone(walk, out, more);
}
EXPORT_SYMBOL_GPL(scatterwalk_done);