lkml.org 
[lkml]   [2015]   [Feb]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
SubjectRe: [GIT] Networking
From
On Tue, Feb 10, 2015 at 6:01 PM, Linus Torvalds
<torvalds@linux-foundation.org> wrote:
>
> Are there no tests for that crypto interface?

Oh well.

With the attached, it at least does boot and work for me.

Linus
crypto/af_alg.c | 2 +-
crypto/algif_skcipher.c | 5 ++---
2 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/crypto/af_alg.c b/crypto/af_alg.c
index eb78fe8a60c8..3e80d8b8be45 100644
--- a/crypto/af_alg.c
+++ b/crypto/af_alg.c
@@ -348,7 +348,7 @@ int af_alg_make_sg(struct af_alg_sgl *sgl, struct iov_iter *iter, int len)
if (n < 0)
return n;

- npages = PAGE_ALIGN(off + n);
+ npages = (off + n + PAGE_SIZE - 1) >> PAGE_SHIFT;
if (WARN_ON(npages == 0))
return -EINVAL;

diff --git a/crypto/algif_skcipher.c b/crypto/algif_skcipher.c
index 37110fd68adf..6fc12c3fc4b9 100644
--- a/crypto/algif_skcipher.c
+++ b/crypto/algif_skcipher.c
@@ -439,14 +439,13 @@ static int skcipher_recvmsg(struct kiocb *unused, struct socket *sock,
while (!sg->length)
sg++;

- used = ctx->used;
- if (!used) {
+ if (!ctx->used) {
err = skcipher_wait_for_data(sk, flags);
if (err)
goto unlock;
}

- used = min_t(unsigned long, used, iov_iter_count(&msg->msg_iter));
+ used = min_t(unsigned long, ctx->used, iov_iter_count(&msg->msg_iter));

used = af_alg_make_sg(&ctx->rsgl, &msg->msg_iter, used);
err = used;
\
 
 \ /
  Last update: 2015-02-11 05:21    [W:1.831 / U:0.060 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site