[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <YdvuhjweiC1SjVF4@infradead.org>
Date: Mon, 10 Jan 2022 00:29:58 -0800
From: Christoph Hellwig <hch@...radead.org>
To: "Matthew Wilcox (Oracle)" <willy@...radead.org>
Cc: linux-mm@...ck.org, John Hubbard <jhubbard@...dia.com>,
Christoph Hellwig <hch@...radead.org>,
William Kucharski <william.kucharski@...cle.com>,
linux-kernel@...r.kernel.org, Jason Gunthorpe <jgg@...pe.ca>
Subject: Re: [PATCH v2 06/28] gup: Fix some contiguous memmap assumptions
On Mon, Jan 10, 2022 at 04:23:44AM +0000, Matthew Wilcox (Oracle) wrote:
> Several functions in gup.c assume that a compound page has virtually
> contiguous page structs. This isn't true for SPARSEMEM configs unless
> SPARSEMEM_VMEMMAP is also set. Fix them by using nth_page() instead of
> plain pointer arithmetic.
So is this an actualy bug that need a Fixes tag, or do all architectures
that support THP and sparsemem use SPARSEMEM_VMEMMAP?
> + page = nth_page(head, (addr & (sz-1)) >> PAGE_SHIFT);
Would be nice to fix the indeation for sz - 1 while you're at it.
Otherwise looks good:
Reviewed-by: Christoph Hellwig <hch@....de>
Powered by blists - more mailing lists