lkml.org 
[lkml]   [2020]   [Aug]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] squashfs: avoid bio_alloc() failure with 1Mbyte blocks
On Fri, 14 Aug 2020 21:30:33 -0700 Guenter Roeck <groeck@google.com> wrote:

> On Fri, Aug 14, 2020 at 8:57 PM Phillip Lougher <phillip@squashfs.org.uk> 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 <nicolas.prochazka@gmail.com>
> > Reported-by: Tomoatsu Shimada <shimada@walbrix.com>
> > Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
>
> Fixes: 93e72b3c612a ("squashfs: migrate from ll_rw_block usage to BIO")
> Reviewed-by: Guenter Roeck <groeck@chromium.org>

Thanks. I added cc:stable also.

\
 
 \ /
  Last update: 2020-08-19 05:14    [W:0.056 / U:0.052 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site