All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] parisc: fix pmd accounting with 3-level page tables
@ 2015-03-13 10:30 ` Kirill A. Shutemov
  0 siblings, 0 replies; 4+ messages in thread
From: Kirill A. Shutemov @ 2015-03-13 10:30 UTC (permalink / raw)
  To: Andrew Morton
  Cc: linux-mm, linux-kernel, linux-parisc, Kirill A. Shutemov,
	John David Anglin, Aaro Koskinen, Graham Gower,
	Domenico Andreoli

There's hack in pgd_alloc() on parisc to initialize one pmd, which is
not accounted. It leads to underflow on exit.

Let's adjust nr_pmds on pgd_alloc() to get accounting correct.

Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
Cc: John David Anglin <dave.anglin@bell.net>
Cc: Aaro Koskinen <aaro.koskinen@iki.fi>
Cc: Graham Gower <graham.gower@gmail.com>
Cc: Domenico Andreoli <cavokz@gmail.com>
---
 arch/parisc/include/asm/pgalloc.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/parisc/include/asm/pgalloc.h b/arch/parisc/include/asm/pgalloc.h
index 55ad8be9b7f3..068b2fb9a47c 100644
--- a/arch/parisc/include/asm/pgalloc.h
+++ b/arch/parisc/include/asm/pgalloc.h
@@ -38,6 +38,7 @@ static inline pgd_t *pgd_alloc(struct mm_struct *mm)
 		/* The first pmd entry also is marked with _PAGE_GATEWAY as
 		 * a signal that this pmd may not be freed */
 		__pgd_val_set(*pgd, PxD_FLAG_ATTACHED);
+		mm_inc_nr_pmds(mm);
 #endif
 	}
 	return actual_pgd;
-- 
2.1.4


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2015-03-13 21:50 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-03-13 10:30 [PATCH] parisc: fix pmd accounting with 3-level page tables Kirill A. Shutemov
2015-03-13 10:30 ` Kirill A. Shutemov
2015-03-13 21:50 ` Graham Gower
2015-03-13 21:50   ` Graham Gower

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.