The patch titled
Subject: mm: fix NULL ptr deref when walking hugepages
has been removed from the -mm tree. Its filename was
mm-fix-null-ptr-deref-when-walking-hugepages.patch
This patch was dropped because it was merged into mainline or a subsystem tree
The current -mm tree may be found at http://userweb.kernel.org/~akpm/mmotm/
------------------------------------------------------
From: Sasha Levin <[email protected]>
Subject: mm: fix NULL ptr deref when walking hugepages
A missing vlidation of the value returned by find_vma() could cause a NULL ptr
dereference when walking the pagetable.
This is triggerable from usermode by a simple user by trying to read a
page info out of /proc/pid/pagemap which doesn't exist.
Introduced by commit 025c5b24 ("thp: optimize away unnecessary page table
locking").
Signed-off-by: Sasha Levin <[email protected]>
Reviewed-by: Naoya Horiguchi <[email protected]>
Cc: David Rientjes <[email protected]>
Cc: Andi Kleen <[email protected]>
Cc: Andrea Arcangeli <[email protected]>
Cc: KOSAKI Motohiro <[email protected]>
Cc: KAMEZAWA Hiroyuki <[email protected]>
Cc: <[email protected]> [3.4.x]
Signed-off-by: Andrew Morton <[email protected]>
---
fs/proc/task_mmu.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff -puN fs/proc/task_mmu.c~mm-fix-null-ptr-deref-when-walking-hugepages
fs/proc/task_mmu.c
--- a/fs/proc/task_mmu.c~mm-fix-null-ptr-deref-when-walking-hugepages
+++ a/fs/proc/task_mmu.c
@@ -784,7 +784,7 @@ static int pagemap_pte_range(pmd_t *pmd,
/* find the first VMA at or above 'addr' */
vma = find_vma(walk->mm, addr);
- if (pmd_trans_huge_lock(pmd, vma) == 1) {
+ if (vma && pmd_trans_huge_lock(pmd, vma) == 1) {
for (; addr != end; addr += PAGE_SIZE) {
unsigned long offset;
_
Patches currently in -mm which might be from [email protected] are
origin.patch
linux-next.patch
locking-add-kern_cont-when-needed-to-self-test.patch
isdn-add-missing-kern_cont.patch
isdn-add-missing-kern_cont-fix.patch
ipc-mqueue-improve-performance-of-send-recv-use-correct-gfp-flags-in-msg_insert.patch
--
To unsubscribe from this list: send the line "unsubscribe stable" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html