Re: [GIT] Networking

Al Viro
2015-02-11T01:45:08Z

On Tue, Feb 10, 2015 at 01:50:16PM -0800, Linus Torvalds wrote:
> On Tue, Feb 10, 2015 at 1:26 PM, Linus Torvalds
> <torvalds@linux-foundation.org> wrote:
> >
> > Just to confirm that yes, it's that particular commit 1d10eb2f156f.
> >
> > I reverted it and things work again. So it's not the miscalculation of
> > "used" , but it's certainly *something* in that commit.
>
> How about this?
>
> - npages = (off + len + PAGE_SIZE - 1) >> PAGE_SHIFT;
> + npages = PAGE_ALIGN(off + n);
>
> The two are not even *remotely* the same thing.

The latter isn't a replacement for the former, but yes, it is bogus - bytes
instead of pages.

Could you check if

diff --git a/crypto/af_alg.c b/crypto/af_alg.c
index eb78fe8..5b11d64 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 = DIV_ROUND_UP(off + n, PAGE_SIZE);
if (WARN_ON(npages == 0))
return -EINVAL;

on top of what went into Dave's tree is enough to fix what you are seeing?