stable.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: linux-kernel@vger.kernel.org
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	stable@vger.kernel.org, Zhigang Lu <zlu@tilera.com>,
	Chris Metcalf <cmetcalf@tilera.com>,
	Michal Hocko <mhocko@suse.cz>, Hillf Danton <dhillf@gmail.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	Linus Torvalds <torvalds@linux-foundation.org>
Subject: [ 15/34] mm/hugetlb: set PTE as huge in hugetlb_change_protection and remove_migration_pte
Date: Thu,  7 Feb 2013 16:57:11 -0800	[thread overview]
Message-ID: <20130208004630.049628857@linuxfoundation.org> (raw)
In-Reply-To: <20130208004627.375461662@linuxfoundation.org>

3.7-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Tony Lu <zlu@tilera.com>

commit be7517d6ab9722f0abad6ba5ffd39cfced95549c upstream.

When setting a huge PTE, besides calling pte_mkhuge(), we also need to
call arch_make_huge_pte(), which we indeed do in make_huge_pte(), but we
forget to do in hugetlb_change_protection() and remove_migration_pte().

Signed-off-by: Zhigang Lu <zlu@tilera.com>
Signed-off-by: Chris Metcalf <cmetcalf@tilera.com>
Reviewed-by: Michal Hocko <mhocko@suse.cz>
Acked-by: Hillf Danton <dhillf@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 mm/hugetlb.c |    1 +
 mm/migrate.c |    4 +++-
 2 files changed, 4 insertions(+), 1 deletion(-)

--- a/mm/hugetlb.c
+++ b/mm/hugetlb.c
@@ -3028,6 +3028,7 @@ void hugetlb_change_protection(struct vm
 		if (!huge_pte_none(huge_ptep_get(ptep))) {
 			pte = huge_ptep_get_and_clear(mm, address, ptep);
 			pte = pte_mkhuge(pte_modify(pte, newprot));
+			pte = arch_make_huge_pte(pte, vma, NULL, 0);
 			set_huge_pte_at(mm, address, ptep, pte);
 		}
 	}
--- a/mm/migrate.c
+++ b/mm/migrate.c
@@ -143,8 +143,10 @@ static int remove_migration_pte(struct p
 	if (is_write_migration_entry(entry))
 		pte = pte_mkwrite(pte);
 #ifdef CONFIG_HUGETLB_PAGE
-	if (PageHuge(new))
+	if (PageHuge(new)) {
 		pte = pte_mkhuge(pte);
+		pte = arch_make_huge_pte(pte, vma, new, 0);
+	}
 #endif
 	flush_cache_page(vma, addr, pte_pfn(pte));
 	set_pte_at(mm, addr, ptep, pte);



  parent reply	other threads:[~2013-02-08  0:57 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-02-08  0:56 [ 00/34] 3.7.7-stable review Greg Kroah-Hartman
2013-02-08  0:56 ` [ 01/34] powerpc/mm: Fix hash computation function Greg Kroah-Hartman
2013-02-08  0:56 ` [ 02/34] digsig: Fix memory leakage in digsig_verify_rsa() Greg Kroah-Hartman
2013-02-08  0:56 ` [ 03/34] drm/radeon/evergreen+: wait for the MC to settle after MC blackout Greg Kroah-Hartman
2013-02-08  0:57 ` [ 04/34] drm/radeon: add WAIT_UNTIL to the non-VM safe regs list for cayman/TN Greg Kroah-Hartman
2013-02-08  0:57 ` [ 05/34] drm/radeon: add quirk for RV100 board Greg Kroah-Hartman
2013-02-08  0:57 ` [ 06/34] drm/radeon: fix MC blackout on evergreen+ Greg Kroah-Hartman
2013-02-08  0:57 ` [ 07/34] drm/radeon: fix backend map setup on 1 RB sumo boards Greg Kroah-Hartman
2013-02-08  0:57 ` [ 08/34] drm/radeon: protect against div by 0 in backend setup Greg Kroah-Hartman
2013-02-08  0:57 ` [ 09/34] drm/radeon: prevent crash in the ring space allocation Greg Kroah-Hartman
2013-02-08  0:57 ` [ 10/34] drm/radeon: Calling object_unrefer() when creating fb failure Greg Kroah-Hartman
2013-02-08  0:57 ` [ 11/34] x86-64: Replace left over sti/cli in ia32 audit exit code Greg Kroah-Hartman
2013-02-08  0:57 ` [ 12/34] sched/rt: Use root_domain of rt_rq not current processor Greg Kroah-Hartman
2013-02-08  0:57 ` [ 13/34] mtd: davinci_nand: fix modular build with CONFIG_OF=y Greg Kroah-Hartman
2013-02-08  0:57 ` [ 14/34] nilfs2: fix fix very long mount time issue Greg Kroah-Hartman
2013-02-08  0:57 ` Greg Kroah-Hartman [this message]
2013-02-08  0:57 ` [ 16/34] drivers/rtc/rtc-isl1208.c: call rtc_update_irq() from the alarm irq handler Greg Kroah-Hartman
2013-02-08  0:57 ` [ 17/34] drivers/rtc/rtc-pl031.c: fix the missing operation on enable Greg Kroah-Hartman
2013-02-08  0:57 ` [ 18/34] USB: ftdi_sio: add Zolix FTDI PID Greg Kroah-Hartman
2013-02-08  0:57 ` [ 19/34] USB: ftdi_sio: add PID/VID entries for ELV WS 300 PC II Greg Kroah-Hartman
2013-02-08  0:57 ` [ 20/34] USB: option: add support for Telit LE920 Greg Kroah-Hartman
2013-02-08  0:57 ` [ 21/34] USB: option: add Changhong CH690 Greg Kroah-Hartman
2013-02-08  0:57 ` [ 22/34] USB: qcserial: add Telit Gobi QDL device Greg Kroah-Hartman
2013-02-08  0:57 ` [ 23/34] USB: EHCI: remove ASS/PSS polling timeout Greg Kroah-Hartman
2013-02-08  0:57 ` [ 24/34] USB: EHCI: unlink one async QH at a time Greg Kroah-Hartman
2013-02-08  0:57 ` [ 25/34] USB: EHCI: fix timer bug affecting port resume Greg Kroah-Hartman
2013-02-08  0:57 ` [ 26/34] USB: EHCI: fix bug in scheduling periodic split transfers Greg Kroah-Hartman
2013-02-08  0:57 ` [ 27/34] usb: Using correct way to clear usb3.0 devices remote wakeup feature Greg Kroah-Hartman
2013-02-08  0:57 ` [ 28/34] USB: storage: Define a new macro for USB storage match rules Greg Kroah-Hartman
2013-02-08  0:57 ` [ 29/34] USB: storage: optimize to match the Huawei USB storage devices and support new switch command Greg Kroah-Hartman
2013-02-08  0:57 ` [ 30/34] drivers: xhci: fix incorrect bit test Greg Kroah-Hartman
2013-02-08  0:57 ` [ 31/34] xhci: Fix isoc TD encoding Greg Kroah-Hartman
2013-02-08  0:57 ` [ 32/34] xhci: Fix TD size for isochronous URBs Greg Kroah-Hartman
2013-02-08  0:57 ` [ 33/34] USB: XHCI: fix memory leak of URB-private data Greg Kroah-Hartman
2013-02-08  0:57 ` [ 34/34] usb: Prevent dead ports when xhci is not enabled Greg Kroah-Hartman
2013-02-08 20:29 ` [ 00/34] 3.7.7-stable review Shuah Khan
2013-02-09 12:06 ` Satoru Takeuchi

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=20130208004630.049628857@linuxfoundation.org \
    --to=gregkh@linuxfoundation.org \
    --cc=akpm@linux-foundation.org \
    --cc=cmetcalf@tilera.com \
    --cc=dhillf@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mhocko@suse.cz \
    --cc=stable@vger.kernel.org \
    --cc=torvalds@linux-foundation.org \
    --cc=zlu@tilera.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).