]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
3.4-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 6 Jan 2014 20:40:00 +0000 (12:40 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 6 Jan 2014 20:40:00 +0000 (12:40 -0800)
added patches:
mm-hugetlb-check-for-pte-null-pointer-in-__page_check_address.patch

queue-3.4/mm-hugetlb-check-for-pte-null-pointer-in-__page_check_address.patch [new file with mode: 0644]
queue-3.4/series

diff --git a/queue-3.4/mm-hugetlb-check-for-pte-null-pointer-in-__page_check_address.patch b/queue-3.4/mm-hugetlb-check-for-pte-null-pointer-in-__page_check_address.patch
new file mode 100644 (file)
index 0000000..a9faf4d
--- /dev/null
@@ -0,0 +1,40 @@
+From 98398c32f6687ee1e1f3ae084effb4b75adb0747 Mon Sep 17 00:00:00 2001
+From: Jianguo Wu <wujianguo@huawei.com>
+Date: Wed, 18 Dec 2013 17:08:59 -0800
+Subject: mm/hugetlb: check for pte NULL pointer in __page_check_address()
+
+From: Jianguo Wu <wujianguo@huawei.com>
+
+commit 98398c32f6687ee1e1f3ae084effb4b75adb0747 upstream.
+
+In __page_check_address(), if address's pud is not present,
+huge_pte_offset() will return NULL, we should check the return value.
+
+Signed-off-by: Jianguo Wu <wujianguo@huawei.com>
+Cc: Naoya Horiguchi <n-horiguchi@ah.jp.nec.com>
+Cc: Mel Gorman <mgorman@suse.de>
+Cc: qiuxishi <qiuxishi@huawei.com>
+Cc: Hanjun Guo <guohanjun@huawei.com>
+Acked-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.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/rmap.c |    4 ++++
+ 1 file changed, 4 insertions(+)
+
+--- a/mm/rmap.c
++++ b/mm/rmap.c
+@@ -623,7 +623,11 @@ pte_t *__page_check_address(struct page
+       spinlock_t *ptl;
+       if (unlikely(PageHuge(page))) {
++              /* when pud is not present, pte will be NULL */
+               pte = huge_pte_offset(mm, address);
++              if (!pte)
++                      return NULL;
++
+               ptl = &mm->page_table_lock;
+               goto check;
+       }
index ebe6de19823b3accc997501e7e3c235a3c93ba46..121ec2c315425af8806cef420f8238e44778b145 100644 (file)
@@ -30,3 +30,4 @@ cpupower-fix-segfault-due-to-incorrect-getopt_long-arugments.patch
 libata-add-ata_horkage_broken_fpdma_aa-quirk-for-seagate-momentus-spinpoint-m8.patch
 radiotap-fix-bitmap-end-finding-buffer-overrun.patch
 rtlwifi-pci-fix-oops-on-driver-unload.patch
+mm-hugetlb-check-for-pte-null-pointer-in-__page_check_address.patch