From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751679AbbBKBpI (ORCPT ); Tue, 10 Feb 2015 20:45:08 -0500 Received: from zeniv.linux.org.uk ([195.92.253.2]:55125 "EHLO ZenIV.linux.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751075AbbBKBpH (ORCPT ); Tue, 10 Feb 2015 20:45:07 -0500 Date: Wed, 11 Feb 2015 01:45:02 +0000 From: Al Viro To: Linus Torvalds Cc: David Miller , Andrew Morton , Network Development , Linux Kernel Mailing List Subject: Re: [GIT] Networking Message-ID: <20150211014502.GB29656@ZenIV.linux.org.uk> References: <20150209.191601.1373941323785500419.davem@davemloft.net> <20150209.205209.1524645061817000265.davem@davemloft.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Feb 10, 2015 at 01:50:16PM -0800, Linus Torvalds wrote: > On Tue, Feb 10, 2015 at 1:26 PM, Linus Torvalds > 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?