From: David Miller <davem@davemloft.net>
To: linux-crypto@vger.kernel.org
Cc: herbert@gondor.apana.org.au
Subject: [PATCH 2/6] crypto: Fix scatterwalk_done() test.
Date: Mon, 17 May 2010 22:22:37 -0700 (PDT) [thread overview]
Message-ID: <20100517.222237.232897853.davem@davemloft.net> (raw)
We are done with the scattergather entry when the walk offset goes
past sg->offset + sg->length, not when it crosses a page boundary.
There is a similarly queer test in the second half of
scatterwalk_pagedone() that probably needs some scrutiny.
Signed-off-by: David S. Miller <davem@davemloft.net>
---
crypto/scatterwalk.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/crypto/scatterwalk.c b/crypto/scatterwalk.c
index 3de89a4..b3acf4f 100644
--- a/crypto/scatterwalk.c
+++ b/crypto/scatterwalk.c
@@ -68,7 +68,7 @@ static void scatterwalk_pagedone(struct scatter_walk *walk, int out,
void scatterwalk_done(struct scatter_walk *walk, int out, int more)
{
- if (!offset_in_page(walk->offset) || !more)
+ if (walk->offset >= walk->sg->offset + walk->sg->length || !more)
scatterwalk_pagedone(walk, out, more);
}
EXPORT_SYMBOL_GPL(scatterwalk_done);
--
1.7.0.4
next reply other threads:[~2010-05-18 5:22 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-05-18 5:22 David Miller [this message]
2010-05-19 4:05 ` [PATCH 2/6] crypto: Fix scatterwalk_done() test Herbert Xu
2010-05-19 5:54 ` David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20100517.222237.232897853.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=herbert@gondor.apana.org.au \
--cc=linux-crypto@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).