Re: [GIT] Networking

From: Linus Torvalds
Date: Tue Feb 10 2015 - 21:01:40 EST


On Tue, Feb 10, 2015 at 5:45 PM, Al Viro <viro@xxxxxxxxxxxxxxxxxx> wrote:
>
> 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?

So quite frankly, considering that we already know that 'used' was
also calculated wrong (it stays at zero) and that the one-liner above
is not sufficient on its own, by now I'd like somebody with an actual
test-case to check this thing out., and send me a proper tested patch.
That somebody preferably being you.

Are there no tests for that crypto interface?

Also, I'm unhappy that you made these unrelated and broken changes at
all. Both wrt 'used' and this 'npages' thing, the original code wasn't
wrong, and the pointless changes to correct code not only broke
things, but had nothing to do with the iovec conversion that was the
stated reason for the commit.

Grr. I really hate it when I find bugs during the merge window. My
test environment is *not* odd. If _I_ end up being the one finding the
bugs, that means that things must have gotten basically no testing at
all.

I spend a *lot* of time during the merge window doing "make
allmodconfig" builds and trying to actually also boot the resulting
kernel before pushing things out. But it does mean that when I *do*
catch it, I'd like the cost of fixing it be on the person who
introduced the problem, rather than me spending even *more* time on
this.

Linus
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/