On Tue, Feb 10, 2015 at 01:50:16PM -0800, Linus Torvalds wrote:
> On Tue, Feb 10, 2015 at 1:26 PM, Linus Torvalds
> <torva...@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?
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to