Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp548809imu; Tue, 27 Nov 2018 02:44:38 -0800 (PST) X-Google-Smtp-Source: AFSGD/WOTwdMo6HksTxPV61ovpbClK4njbvQM1m+yBxvRBc+dKx7lJa0VHRGppctauPHmeQozcEY X-Received: by 2002:a17:902:15c5:: with SMTP id a5-v6mr31494877plh.136.1543315478131; Tue, 27 Nov 2018 02:44:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1543315478; cv=none; d=google.com; s=arc-20160816; b=H/sXYj0Sya6pjmEztiLO8JHqO56guIE5DTEbcdTgo6bFNeQoPBxRPaYtDSeTtgfI4n IJe9tX3PuSVrDmHdrEDkUrLbTRqFlXKNQz0dbSJSips9MXPkCEgSItDKQI2Idyjf+FUY 6C1IHOogQYnnlcRq/D36KTtq3XXUXa9L17jK15ieyctYKmeHLb2lYZ3NsC8mNZZ/u4Lr TLoyrXlESrRAdb6gsPujl1l16vHWh11H86d+dcKmbgKWDlu7g/mjV8EWE95YhS5S7x4f ZGwAxA8Hr3PP1ZgjzHs2N2Baz00UcsEhgIF8TVWFGaqjFTs28Ds5p/zcO9r63rhhyN7B 3xkA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :message-id:date:subject:cc:to:from; bh=x7TPoHtTSfYCNdXRsSmuFvu8nD7dqqQiFIVBGnOHk9A=; b=KhX3QJK9+N+MfdvRMxM2Sa2CXtrpX97cfiEHLhGgwa+fsssFJweOTmRsUIZ+obwx6O 4codN7AbAFjO4jd2gLv+BFqBjKhyhQV+SvBao8S8m0aJ4z41f7rmjNCWmy0x+WRdZ06U HH7zFtrOflBpHDSr2d8kMw42celjsysWOiizF5tfyjZc2ip9GvdtycEHuDFJbBvnCuPU K6YV9iw4qlJkxGgxoOPk/r5NuG8nUq5V/mAy6zsF08IeDtzskjY9OgKX6XaF9grP0S92 kBfLyPQWqALJeDiems/ORNiRSv/xN1FpEYqzJv4/3yBdBukVwtxQmEoB/2denM9dtNj8 NzgA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p4si3553744pli.432.2018.11.27.02.44.20; Tue, 27 Nov 2018 02:44:38 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729558AbeK0TdS (ORCPT + 99 others); Tue, 27 Nov 2018 14:33:18 -0500 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:54242 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728985AbeK0TdS (ORCPT ); Tue, 27 Nov 2018 14:33:18 -0500 Received: from pps.filterd (m0098419.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id wAR8ZcoQ011389 for ; Tue, 27 Nov 2018 03:36:10 -0500 Received: from e06smtp07.uk.ibm.com (e06smtp07.uk.ibm.com [195.75.94.103]) by mx0b-001b2d01.pphosted.com with ESMTP id 2p10aye3hk-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Tue, 27 Nov 2018 03:36:09 -0500 Received: from localhost by e06smtp07.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Tue, 27 Nov 2018 08:36:07 -0000 Received: from b06cxnps4074.portsmouth.uk.ibm.com (9.149.109.196) by e06smtp07.uk.ibm.com (192.168.101.137) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Tue, 27 Nov 2018 08:36:06 -0000 Received: from b06wcsmtp001.portsmouth.uk.ibm.com (b06wcsmtp001.portsmouth.uk.ibm.com [9.149.105.160]) by b06cxnps4074.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id wAR8a5Ua20512848 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Tue, 27 Nov 2018 08:36:05 GMT Received: from b06wcsmtp001.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 41B37A4054; Tue, 27 Nov 2018 08:36:05 +0000 (GMT) Received: from b06wcsmtp001.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id F1BF5A405B; Tue, 27 Nov 2018 08:36:04 +0000 (GMT) Received: from tuxmaker.boeblingen.de.ibm.com (unknown [9.152.85.9]) by b06wcsmtp001.portsmouth.uk.ibm.com (Postfix) with ESMTPS; Tue, 27 Nov 2018 08:36:04 +0000 (GMT) From: Heiko Carstens To: Andrew Morton Cc: linux-kernel@vger.kernel.org, linux-s390@vger.kernel.org, linux-mm@kvack.org, Heiko Carstens , "Kirill A . Shutemov" , Martin Schwidefsky Subject: [PATCH] mm: warn only once if page table misaccounting is detected Date: Tue, 27 Nov 2018 09:36:03 +0100 X-Mailer: git-send-email 2.16.4 X-TM-AS-GCONF: 00 x-cbid: 18112708-0028-0000-0000-000003220DDC X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18112708-0029-0000-0000-000023DE156D Message-Id: <20181127083603.39041-1-heiko.carstens@de.ibm.com> Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7BIT MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2018-11-27_08:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1811270077 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 Cc: Martin Schwidefsky Signed-off-by: Heiko Carstens --- 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