[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20190103143647.GP6310@bombadil.infradead.org>
Date: Thu, 3 Jan 2019 06:36:47 -0800
From: Matthew Wilcox <willy@...radead.org>
To: Jerome Glisse <jglisse@...hat.com>
Cc: Andrew Morton <akpm@...ux-foundation.org>, linux-mm@...ck.org,
linux-xfs@...r.kernel.org, linux-kernel@...r.kernel.org,
Christian König <christian.koenig@....com>,
Jan Kara <jack@...e.cz>
Subject: Re: [PATCH] Initialise mmu_notifier_range correctly
On Thu, Jan 03, 2019 at 09:31:16AM -0500, Jerome Glisse wrote:
> On Wed, Jan 02, 2019 at 04:21:26PM -0800, Matthew Wilcox wrote:
> >
> > One of the paths in follow_pte_pmd() initialised the mmu_notifier_range
> > incorrectly.
> >
> > Signed-off-by: Matthew Wilcox <willy@...radead.org>
> > Fixes: ac46d4f3c432 ("mm/mmu_notifier: use structure for invalidate_range_start/end calls v2")
> > Tested-by: Dave Chinner <dchinner@...hat.com>
>
> Actually now that i have read the code again this is not ok to
> do so. The caller of follow_pte_pmd() will call range_init and
> follow pmd will only update the range address. So existing code
> is ok.
The only caller of follow_pte_pmd() does not call range_init() because it
doesn't know the address. That's the point of follow_pte_pmd().
> I know this is kind of ugly but i do not see a way around that
> uglyness.
You wrote the code ...
Powered by blists - more mailing lists