[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20190509174220.GA6235@bombadil.infradead.org>
Date: Thu, 9 May 2019 10:42:20 -0700
From: Matthew Wilcox <willy@...radead.org>
To: Dan Williams <dan.j.williams@...el.com>
Cc: akpm@...ux-foundation.org, stable@...r.kernel.org,
Piotr Balcer <piotr.balcer@...el.com>,
Yan Ma <yan.ma@...el.com>,
"Aneesh Kumar K.V" <aneesh.kumar@...ux.ibm.com>,
Chandan Rajendra <chandan@...ux.ibm.com>,
Jan Kara <jack@...e.cz>,
Souptick Joarder <jrdr.linux@...il.com>, linux-mm@...ck.org,
linux-kernel@...r.kernel.org, linux-fsdevel@...r.kernel.org
Subject: Re: [PATCH] mm/huge_memory: Fix vmf_insert_pfn_{pmd, pud}() crash,
handle unaligned addresses
On Thu, May 09, 2019 at 09:31:41AM -0700, Dan Williams wrote:
> diff --git a/drivers/dax/device.c b/drivers/dax/device.c
> index e428468ab661..996d68ff992a 100644
> --- a/drivers/dax/device.c
> +++ b/drivers/dax/device.c
> @@ -184,8 +184,7 @@ static vm_fault_t __dev_dax_pmd_fault(struct dev_dax *dev_dax,
> + return vmf_insert_pfn_pmd(vmf, *pfn, vmf->flags & FAULT_FLAG_WRITE);
I think we can ditch the third parameter too. Going through the callers ...
> @@ -235,8 +234,7 @@ static vm_fault_t __dev_dax_pud_fault(struct dev_dax *dev_dax,
> + return vmf_insert_pfn_pud(vmf, *pfn, vmf->flags & FAULT_FLAG_WRITE);
> @@ -1575,8 +1575,7 @@ static vm_fault_t dax_iomap_pmd_fault(struct vm_fault *vmf, pfn_t *pfnp,
> + result = vmf_insert_pfn_pmd(vmf, pfn, write);
This 'write' parameter came earlier from:
bool write = vmf->flags & FAULT_FLAG_WRITE;
and it is not modified subsequently.
> @@ -1686,8 +1685,7 @@ dax_insert_pfn_mkwrite(struct vm_fault *vmf, pfn_t pfn, unsigned int order)
> + ret = vmf_insert_pfn_pmd(vmf, pfn, FAULT_FLAG_WRITE);
If FAULT_FLAG_WRITE is not set in a mkwrite handler, I don't know
what's gone wrong with the world.
Even without these changes,
Reviewed-by: Matthew Wilcox <willy@...radead.org>
Powered by blists - more mailing lists