Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp183236pxa; Tue, 18 Aug 2020 20:42:25 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyKU9TO87yCOq9QwMkQ1QwagMFfOTakbpfSf+HCLDvrjftkzdCDv3mzAyJvlIrHXAO7JEAc X-Received: by 2002:a05:6402:7c7:: with SMTP id u7mr20741629edy.283.1597808545527; Tue, 18 Aug 2020 20:42:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1597808545; cv=none; d=google.com; s=arc-20160816; b=D1eWytMcgxIvkNf1wDlU4Fa19pLcrqX6c8+7isB01qtEY2THtNooMGlwS4oNypMaKF y/cwotr4++b9+H4VWcn5kIu/UFWZptuMX943KXr/dvCF+EnsMAUfw0wg0IROu7QTf//r ybjEiNTbSGmuJSK07LdartTwEVr437ifM9Ccq5DYjC9z/rU2libKMUcA2rDZvDEJHLwg kJUl1e2gKY8xdpGX2w1z0jRCAA3Bj65Yb2DOxkqZen6aFNjS6i1D6RWSQpc8yUEVBVJV Sf/V+LSCUI/IUtEOBSO/jpdo3dIQ7tnWHanrholn3wyZvrse4qfzVWsNbD3vtZUc+Cn/ QnOg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=qQ8QPS3olRgxbCScO+ui+xd/kgUgdftvRogWjgx5ODE=; b=hacxVxHvwI3dqIBYrVsYrcrKFRgG51sYV6ehdWouj1Fic9e/CdPB656bHAKiguioUa 4zZ2rky+k4sezgNj1w7Bnmc9L6hgOmBDMLju5Wd9EFOHZ3YUV2sZcK3zwVsAUvCktHrm BBa1lhwUdUNZYg0SQkl/QjpAKmdN8JCbrhFDgcgL10RsVigu1YWgrGJnScet4sJ7zve+ kSMVygQ14MIH7pqdYQGaOsvhAZ6nfBrhxJABHK+WvTPMOzN7x0gD65oQZvTsCQDqbrJV ytKaZa+wmouz0FUxKaJuWa4h+A/X6f3g9whhauXYJRu52WGqT9N/zTCptvMZj8HXwkRP SLgA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=Y6chg8Zc; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id d4si14024822edx.195.2020.08.18.20.42.01; Tue, 18 Aug 2020 20:42:25 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=Y6chg8Zc; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727914AbgHSDN2 (ORCPT + 99 others); Tue, 18 Aug 2020 23:13:28 -0400 Received: from mail.kernel.org ([198.145.29.99]:46872 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727793AbgHSDN1 (ORCPT ); Tue, 18 Aug 2020 23:13:27 -0400 Received: from localhost.localdomain (c-73-231-172-41.hsd1.ca.comcast.net [73.231.172.41]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 33D1B2065F; Wed, 19 Aug 2020 03:13:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1597806807; bh=3HYKC4lph4BSGjKk7QnGJ/iNJRQMO5s9oVBYH6NYs40=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=Y6chg8ZcukcmnDpajVBgevZppgQK1mINo+4sdKBBmU91pVR5RZUrU1kDSZzsW/Naq XduQkg9vC+UKUFEf8NV5iXGoTzaSpdgWfG2jkF2grngC5emeQOmZcEWrUL/k2OOEv9 HfjGIy6x28gKzIn78NCWMYN/gp9gFup7TNQjt6hM= Date: Tue, 18 Aug 2020 20:13:26 -0700 From: Andrew Morton To: Guenter Roeck Cc: Phillip Lougher , linux-kernel , Philippe Liard , hch@lst.de, adrien+dev@schischi.me, Guenter Roeck , Daniel Rosenberg , Nicolas Prochazka , Tomoatsu Shimada Subject: Re: [PATCH] squashfs: avoid bio_alloc() failure with 1Mbyte blocks Message-Id: <20200818201326.2b9eab480ab4228ccd250ffa@linux-foundation.org> In-Reply-To: References: <20200815035637.15319-1-phillip@squashfs.org.uk> X-Mailer: Sylpheed 3.5.1 (GTK+ 2.24.31; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 14 Aug 2020 21:30:33 -0700 Guenter Roeck wrote: > On Fri, Aug 14, 2020 at 8:57 PM Phillip Lougher wrote: > > > > This is a regression introduced by the "migrate from ll_rw_block usage > > to BIO" patch. > > > > Bio_alloc() is limited to 256 pages (1 Mbyte). This can cause a > > failure when reading 1 Mbyte block filesystems. The problem is > > a datablock can be fully (or almost uncompressed), requiring 256 > > pages, but, because blocks are not aligned to page boundaries, it > > may require 257 pages to read. > > > > Bio_kmalloc() can handle 1024 pages, and so use this for the > > edge condition. > > > > Reported-by: Nicolas Prochazka > > Reported-by: Tomoatsu Shimada > > Signed-off-by: Phillip Lougher > > Fixes: 93e72b3c612a ("squashfs: migrate from ll_rw_block usage to BIO") > Reviewed-by: Guenter Roeck Thanks. I added cc:stable also.