From: Dave Jiang <dave.jiang@intel.com>
To: akpm@linux-foundation.org
Cc: linux-mm@kvack.org, linux-nvdimm@lists.01.org, jack@suse.com
Subject: Re: [PATCH] mm: fix BUG_ON() in vmf_insert_pfn_pud() from VM_MIXEDMAP removal
Date: Thu, 30 Aug 2018 13:15:52 -0700 [thread overview]
Message-ID: <6fac48b2-6285-c8b2-a3ef-00a70846bed9@intel.com> (raw)
In-Reply-To: <153565954666.35458.15832314745699968487.stgit@djiang5-desk3.ch.intel.com>
Please ignore this email. It had malformed mail header. I have resent a
non-broken one, which looks like has been ack'ed by Jeff.
On 08/30/2018 01:05 PM, Dave Jiang wrote:
> It looks like I missed the PUD path when doing VM_MIXEDMAP removal.
> This can be triggered by:
> 1. Boot with memmap=4G!8G
> 2. build ndctl with destructive flag on
> 3. make TESTS=device-dax check
>
> [ +0.000675] kernel BUG at mm/huge_memory.c:824!
>
> Applying the same change that was applied to vmf_insert_pfn_pmd() in the
> original patch.
>
> Fixes: e1fb4a08649 ("dax: remove VM_MIXEDMAP for fsdax and device dax")
>
> Reported-by: Vishal Verma <vishal.l.verma@intel.com>
> Signed-off-by: Dave Jiang <dave.jiang@intel.com>
> ---
> mm/huge_memory.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/mm/huge_memory.c b/mm/huge_memory.c
> index c3bc7e9c9a2a..533f9b00147d 100644
> --- a/mm/huge_memory.c
> +++ b/mm/huge_memory.c
> @@ -821,11 +821,11 @@ vm_fault_t vmf_insert_pfn_pud(struct vm_area_struct *vma, unsigned long addr,
> * but we need to be consistent with PTEs and architectures that
> * can't support a 'special' bit.
> */
> - BUG_ON(!(vma->vm_flags & (VM_PFNMAP|VM_MIXEDMAP)));
> + BUG_ON(!(vma->vm_flags & (VM_PFNMAP|VM_MIXEDMAP)) &&
> + !pfn_t_devmap(pfn));
> BUG_ON((vma->vm_flags & (VM_PFNMAP|VM_MIXEDMAP)) ==
> (VM_PFNMAP|VM_MIXEDMAP));
> BUG_ON((vma->vm_flags & VM_PFNMAP) && is_cow_mapping(vma->vm_flags));
> - BUG_ON(!pfn_t_devmap(pfn));
>
> if (addr < vma->vm_start || addr >= vma->vm_end)
> return VM_FAULT_SIGBUS;
>
> _______________________________________________
> Linux-nvdimm mailing list
> Linux-nvdimm@lists.01.org
> https://lists.01.org/mailman/listinfo/linux-nvdimm
>
_______________________________________________
Linux-nvdimm mailing list
Linux-nvdimm@lists.01.org
https://lists.01.org/mailman/listinfo/linux-nvdimm
WARNING: multiple messages have this Message-ID (diff)
From: Dave Jiang <dave.jiang@intel.com>
To: akpm@linux-foundation.org
Cc: jack@suse.com, linux-mm@kvack.org, dan.j.williams@intel.com,
linux-nvdimm@lists.01.org
Subject: Re: [PATCH] mm: fix BUG_ON() in vmf_insert_pfn_pud() from VM_MIXEDMAP removal
Date: Thu, 30 Aug 2018 13:15:52 -0700 [thread overview]
Message-ID: <6fac48b2-6285-c8b2-a3ef-00a70846bed9@intel.com> (raw)
In-Reply-To: <153565954666.35458.15832314745699968487.stgit@djiang5-desk3.ch.intel.com>
Please ignore this email. It had malformed mail header. I have resent a
non-broken one, which looks like has been ack'ed by Jeff.
On 08/30/2018 01:05 PM, Dave Jiang wrote:
> It looks like I missed the PUD path when doing VM_MIXEDMAP removal.
> This can be triggered by:
> 1. Boot with memmap=4G!8G
> 2. build ndctl with destructive flag on
> 3. make TESTS=device-dax check
>
> [ +0.000675] kernel BUG at mm/huge_memory.c:824!
>
> Applying the same change that was applied to vmf_insert_pfn_pmd() in the
> original patch.
>
> Fixes: e1fb4a08649 ("dax: remove VM_MIXEDMAP for fsdax and device dax")
>
> Reported-by: Vishal Verma <vishal.l.verma@intel.com>
> Signed-off-by: Dave Jiang <dave.jiang@intel.com>
> ---
> mm/huge_memory.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/mm/huge_memory.c b/mm/huge_memory.c
> index c3bc7e9c9a2a..533f9b00147d 100644
> --- a/mm/huge_memory.c
> +++ b/mm/huge_memory.c
> @@ -821,11 +821,11 @@ vm_fault_t vmf_insert_pfn_pud(struct vm_area_struct *vma, unsigned long addr,
> * but we need to be consistent with PTEs and architectures that
> * can't support a 'special' bit.
> */
> - BUG_ON(!(vma->vm_flags & (VM_PFNMAP|VM_MIXEDMAP)));
> + BUG_ON(!(vma->vm_flags & (VM_PFNMAP|VM_MIXEDMAP)) &&
> + !pfn_t_devmap(pfn));
> BUG_ON((vma->vm_flags & (VM_PFNMAP|VM_MIXEDMAP)) ==
> (VM_PFNMAP|VM_MIXEDMAP));
> BUG_ON((vma->vm_flags & VM_PFNMAP) && is_cow_mapping(vma->vm_flags));
> - BUG_ON(!pfn_t_devmap(pfn));
>
> if (addr < vma->vm_start || addr >= vma->vm_end)
> return VM_FAULT_SIGBUS;
>
> _______________________________________________
> Linux-nvdimm mailing list
> Linux-nvdimm@lists.01.org
> https://lists.01.org/mailman/listinfo/linux-nvdimm
>
next prev parent reply other threads:[~2018-08-30 20:16 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-08-30 20:05 [PATCH] mm: fix BUG_ON() in vmf_insert_pfn_pud() from VM_MIXEDMAP removal Dave Jiang
2018-08-30 20:05 ` Dave Jiang
2018-08-30 20:15 ` Dave Jiang [this message]
2018-08-30 20:15 ` Dave Jiang
-- strict thread matches above, loose matches on Subject: below --
2018-08-30 20:06 Dave Jiang
2018-08-30 20:06 ` Dave Jiang
2018-08-30 20:12 ` Jeff Moyer
2018-08-30 20:12 ` Jeff Moyer
2018-08-30 20:28 ` Verma, Vishal L
2018-08-30 20:28 ` Verma, Vishal L
2018-08-31 10:22 ` Jan Kara
2018-08-31 10:22 ` Jan Kara
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=6fac48b2-6285-c8b2-a3ef-00a70846bed9@intel.com \
--to=dave.jiang@intel.com \
--cc=akpm@linux-foundation.org \
--cc=jack@suse.com \
--cc=linux-mm@kvack.org \
--cc=linux-nvdimm@lists.01.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.