All of lore.kernel.org
 help / color / mirror / Atom feed
From: Chas Williams <3chas3@gmail.com>
To: stable@vger.kernel.org
Cc: natechancellor@gmail.com, mark.rutland@arm.com,
	will.deacon@arm.com, steve.capper@arm.com,
	kirill.shutemov@linux.intel.com, vbabka@suse.cz, mgorman@suse.de,
	Chas Williams <chas3@att.com>
Subject: [PATCH][v4.4.y] Fixes: Commit cdbf92675fad ("mm: numa: avoid waiting on freed migrated pages")
Date: Thu,  6 Sep 2018 11:11:27 -0400	[thread overview]
Message-ID: <20180906151127.17686-1-3chas3@gmail.com> (raw)
In-Reply-To: <20180905085852.8122-1-3chas3@gmail.com>

From: Chas Williams <chas3@att.com>

Commit cdbf92675fad ("mm: numa: avoid waiting on freed migrated pages")
was an incomplete backport of the upstream commit.  It is necessary to
always reset page_nid before attempting any early exit.

The original commit conflicted due to lack of commit 82b0f8c39a38
("mm: join struct fault_env and vm_fault") in 4.9 so it wasn't a clean
application, and the change must have just gotten lost in the noise.

Signed-off-by: Chas Williams <chas3@att.com>
---
 mm/huge_memory.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/mm/huge_memory.c b/mm/huge_memory.c
index 0127b788272f..c4ea57ee2fd1 100644
--- a/mm/huge_memory.c
+++ b/mm/huge_memory.c
@@ -1393,12 +1393,12 @@ int do_huge_pmd_numa_page(struct mm_struct *mm, struct vm_area_struct *vma,
 
 	/* Migration could have started since the pmd_trans_migrating check */
 	if (!page_locked) {
+		page_nid = -1;
 		if (!get_page_unless_zero(page))
 			goto out_unlock;
 		spin_unlock(ptl);
 		wait_on_page_locked(page);
 		put_page(page);
-		page_nid = -1;
 		goto out;
 	}
 
-- 
2.14.4

      parent reply	other threads:[~2018-09-06 19:47 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-05  8:58 [PATCH v4.9.y] Fixes: Commit 3c226c637b69 ("mm: numa: avoid waiting on freed migrated pages") Chas Williams
2018-09-05  9:05 ` Greg KH
2018-09-05  9:18   ` Nathan Chancellor
     [not found]     ` <CAG2-Gkn69EFYV2XwBraSt2nPwxRh2i+vV-XRfzxsZH2_7cORhg@mail.gmail.com>
2018-09-05  9:32       ` Greg Kroah-Hartman
2018-09-05  9:41         ` Chas Williams
2018-09-05 10:07           ` Greg Kroah-Hartman
2018-09-05 14:43 ` [PATCH] Fixes: Commit 2aa6d036b716 " Chas Williams
2018-09-05 15:02   ` Greg KH
2018-09-05 17:46     ` Chas Williams
2018-09-06 15:09 ` [PATCH][4.9.y] " Chas Williams
2018-09-06 15:10 ` [PATCH][v3.18.y] Fixes: Commit 86af955d02bb " Chas Williams
2018-09-06 15:11 ` Chas Williams [this message]

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=20180906151127.17686-1-3chas3@gmail.com \
    --to=3chas3@gmail.com \
    --cc=chas3@att.com \
    --cc=kirill.shutemov@linux.intel.com \
    --cc=mark.rutland@arm.com \
    --cc=mgorman@suse.de \
    --cc=natechancellor@gmail.com \
    --cc=stable@vger.kernel.org \
    --cc=steve.capper@arm.com \
    --cc=vbabka@suse.cz \
    --cc=will.deacon@arm.com \
    /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.