Re: [PATCH v2] dax: fix NULL pointer in __dax_pmd_fault()

2015-09-24 Thread Dan Williams
On Wed, Sep 23, 2015 at 2:04 AM, Dave Chinner wrote: > On Tue, Sep 22, 2015 at 08:00:29PM -0700, Dan Williams wrote: >> The kaddr is coming from the devm_memremap() in the pmem driver that >> gets unmapped after the device is released by the driver. > > Perhaps the better solution is to not tear d

Re: [PATCH v2] dax: fix NULL pointer in __dax_pmd_fault()

2015-09-24 Thread Boaz Harrosh
On 09/23/2015 12:04 PM, Dave Chinner wrote: > On Tue, Sep 22, 2015 at 08:00:29PM -0700, Dan Williams wrote: <> >> The kaddr is coming from the devm_memremap() in the pmem driver that >> gets unmapped after the device is released by the driver. > > Perhaps the better solution is to not tear down th

Re: [PATCH v2] dax: fix NULL pointer in __dax_pmd_fault()

2015-09-23 Thread Dave Chinner
On Tue, Sep 22, 2015 at 08:00:29PM -0700, Dan Williams wrote: > On Tue, Sep 22, 2015 at 4:30 PM, Dave Chinner wrote: > > On Tue, Sep 22, 2015 at 02:25:19PM -0700, Dan Williams wrote: > >> On Tue, Sep 22, 2015 at 2:13 PM, Andrew Morton > >> wrote: > >> > On Tue, 22 Sep 2015 13:36:22 -0600 Ross Zwi

Re: [PATCH v2] dax: fix NULL pointer in __dax_pmd_fault()

2015-09-22 Thread Dan Williams
On Tue, Sep 22, 2015 at 4:30 PM, Dave Chinner wrote: > On Tue, Sep 22, 2015 at 02:25:19PM -0700, Dan Williams wrote: >> On Tue, Sep 22, 2015 at 2:13 PM, Andrew Morton >> wrote: >> > On Tue, 22 Sep 2015 13:36:22 -0600 Ross Zwisler >> > wrote: >> > >> >> The following commit: >> >> >> >> commit 4

Re: [PATCH v2] dax: fix NULL pointer in __dax_pmd_fault()

2015-09-22 Thread Dave Chinner
On Tue, Sep 22, 2015 at 02:25:19PM -0700, Dan Williams wrote: > On Tue, Sep 22, 2015 at 2:13 PM, Andrew Morton > wrote: > > On Tue, 22 Sep 2015 13:36:22 -0600 Ross Zwisler > > wrote: > > > >> The following commit: > >> > >> commit 46c043ede471 ("mm: take i_mmap_lock in unmap_mapping_range() for

Re: [PATCH v2] dax: fix NULL pointer in __dax_pmd_fault()

2015-09-22 Thread Dan Williams
On Tue, Sep 22, 2015 at 2:17 PM, Ross Zwisler wrote: > On Tue, Sep 22, 2015 at 01:51:04PM -0700, Dan Williams wrote: >> [ adding Andrew ] >> >> On Tue, Sep 22, 2015 at 12:36 PM, Ross Zwisler >> wrote: >> > The following commit: >> > >> > commit 46c043ede471 ("mm: take i_mmap_lock in unmap_mapping

Re: [PATCH v2] dax: fix NULL pointer in __dax_pmd_fault()

2015-09-22 Thread Dan Williams
On Tue, Sep 22, 2015 at 2:13 PM, Andrew Morton wrote: > On Tue, 22 Sep 2015 13:36:22 -0600 Ross Zwisler > wrote: > >> The following commit: >> >> commit 46c043ede471 ("mm: take i_mmap_lock in unmap_mapping_range() for >> DAX") >> >> moved some code in __dax_pmd_fault() that was responsible

Re: [PATCH v2] dax: fix NULL pointer in __dax_pmd_fault()

2015-09-22 Thread Andrew Morton
On Tue, 22 Sep 2015 13:36:22 -0600 Ross Zwisler wrote: > The following commit: > > commit 46c043ede471 ("mm: take i_mmap_lock in unmap_mapping_range() for > DAX") > > moved some code in __dax_pmd_fault() that was responsible for zeroing > newly allocated PMD pages. The new location didn

Re: [PATCH v2] dax: fix NULL pointer in __dax_pmd_fault()

2015-09-22 Thread Dan Williams
[ adding Andrew ] On Tue, Sep 22, 2015 at 12:36 PM, Ross Zwisler wrote: > The following commit: > > commit 46c043ede471 ("mm: take i_mmap_lock in unmap_mapping_range() for > DAX") > > moved some code in __dax_pmd_fault() that was responsible for zeroing > newly allocated PMD pages. The n

[PATCH v2] dax: fix NULL pointer in __dax_pmd_fault()

2015-09-22 Thread Ross Zwisler
The following commit: commit 46c043ede471 ("mm: take i_mmap_lock in unmap_mapping_range() for DAX") moved some code in __dax_pmd_fault() that was responsible for zeroing newly allocated PMD pages. The new location didn't properly set up 'kaddr', though, so when run this code resulted in