linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mm: warn only once if page table misaccounting is detected
@ 2018-11-27  8:36 Heiko Carstens
  2018-11-27  8:46 ` Kirill A. Shutemov
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Heiko Carstens @ 2018-11-27  8:36 UTC (permalink / raw)
  To: Andrew Morton
  Cc: linux-kernel, linux-s390, linux-mm, Heiko Carstens,
	Kirill A . Shutemov, Martin Schwidefsky

Use pr_alert_once() instead of pr_alert() if page table misaccounting
has been detected.

If this happens once it is very likely that there will be numerous
other occurrence as well, which would flood dmesg and the console with
hardly any added information. Therefore print the warning only once.

Cc: Kirill A. Shutemov <kirill@shutemov.name>
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
---
 kernel/fork.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/kernel/fork.c b/kernel/fork.c
index 07cddff89c7b..c887e9eba89f 100644
--- a/kernel/fork.c
+++ b/kernel/fork.c
@@ -647,8 +647,8 @@ static void check_mm(struct mm_struct *mm)
 	}
 
 	if (mm_pgtables_bytes(mm))
-		pr_alert("BUG: non-zero pgtables_bytes on freeing mm: %ld\n",
-				mm_pgtables_bytes(mm));
+		pr_alert_once("BUG: non-zero pgtables_bytes on freeing mm: %ld\n",
+			      mm_pgtables_bytes(mm));
 
 #if defined(CONFIG_TRANSPARENT_HUGEPAGE) && !USE_SPLIT_PMD_PTLOCKS
 	VM_BUG_ON_MM(mm->pmd_huge_pte, mm);
-- 
2.16.4


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

end of thread, other threads:[~2018-11-27 16:29 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-11-27  8:36 [PATCH] mm: warn only once if page table misaccounting is detected Heiko Carstens
2018-11-27  8:46 ` Kirill A. Shutemov
2018-11-27 13:19 ` Michal Hocko
2018-11-27 14:36   ` Heiko Carstens
2018-11-27 16:29     ` Michal Hocko
2018-11-27 15:52 ` Sean Christopherson
2018-11-27 15:55   ` William Kucharski

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).