From patchwork Fri Feb 12 12:37:04 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: thermal-bot for Julien Panis X-Patchwork-Id: 12085231 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-18.5 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,MENTIONS_GIT_HOSTING,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id D9FA4C433E9 for ; Fri, 12 Feb 2021 12:37:10 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 947DF64E23 for ; Fri, 12 Feb 2021 12:37:10 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 947DF64E23 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=linutronix.de Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 3BDD38D0052; Fri, 12 Feb 2021 07:37:07 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 27C138D0051; Fri, 12 Feb 2021 07:37:07 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id ED75C8D0015; Fri, 12 Feb 2021 07:37:06 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0053.hostedemail.com [216.40.44.53]) by kanga.kvack.org (Postfix) with ESMTP id C919D8D0015 for ; Fri, 12 Feb 2021 07:37:06 -0500 (EST) Received: from smtpin11.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id 788858249980 for ; Fri, 12 Feb 2021 12:37:06 +0000 (UTC) X-FDA: 77809565652.11.fruit18_430993227621 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin11.hostedemail.com (Postfix) with ESMTP id 5B06D180F8B80 for ; Fri, 12 Feb 2021 12:37:06 +0000 (UTC) X-HE-Tag: fruit18_430993227621 X-Filterd-Recvd-Size: 4118 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) by imf14.hostedemail.com (Postfix) with ESMTP for ; Fri, 12 Feb 2021 12:37:05 +0000 (UTC) Date: Fri, 12 Feb 2021 12:37:04 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1613133424; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=n8HWjMg2IJlMiiqB8K7n+zuxVvfO38iq3o3NujdiIOY=; b=CTInEIMr7IKknI7HL2Jf2GhlPFCGDSaZjC68YPFAkuBYiAIyuTDlylt/latgWryteyYRcy i4sOZ5YrlZ8N/nLo4/iUW0MhjZFq/D+UYngM79hkRtMcRYA0rI/jHrIAC8fCFlmyAUA0JZ Xna8IBwh7Gv3U3bWsKEAi9PIQy3iE+zM9IYtgYrRr48CPXV9aA0tDZ0N8YyLpeRS6gVlsK +YjN702w2AuncpbeP53yAE2GY7TOYSEFzmnPO/6wj47Vns1tfjVU7lqvaBjz1lwsXx+T6+ znivk9dqOj8NtZQcMqjqcgnffq7iDVNDBaAcC1DBgqhrs6RPWYDZtp9fWB0c1g== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1613133424; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=n8HWjMg2IJlMiiqB8K7n+zuxVvfO38iq3o3NujdiIOY=; b=ymRmUulWz/R5IeWW2Ryj4Lnt4vDL7jjeUQoIC1PbazKOahXHpbZ2CW+WokFAC+0qcJDVER jIEMQQ4b/UiH0pCA== From: "tip-bot2 for Paul E. McKenney" Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: core/rcu] mm: Make mem_dump_obj() handle NULL and zero-sized pointers Cc: Christoph Lameter , Pekka Enberg , David Rientjes , Joonsoo Kim , Andrew Morton , , Andrii Nakryiko , Vlastimil Babka , Naresh Kamboju , "Paul E. McKenney" , x86@kernel.org, linux-kernel@vger.kernel.org MIME-Version: 1.0 Message-ID: <161313342401.23325.5802422578509180690.tip-bot2@tip-bot2> Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: The following commit has been merged into the core/rcu branch of tip: Commit-ID: b70fa3b12fc8d2b870d1ac7fd44da89271eb8705 Gitweb: https://git.kernel.org/tip/b70fa3b12fc8d2b870d1ac7fd44da89271eb8705 Author: Paul E. McKenney AuthorDate: Tue, 08 Dec 2020 15:26:22 -08:00 Committer: Paul E. McKenney CommitterDate: Fri, 22 Jan 2021 15:23:57 -08:00 mm: Make mem_dump_obj() handle NULL and zero-sized pointers This commit makes mem_dump_obj() call out NULL and zero-sized pointers specially instead of classifying them as non-paged memory. Cc: Christoph Lameter Cc: Pekka Enberg Cc: David Rientjes Cc: Joonsoo Kim Cc: Andrew Morton Cc: Reported-by: Andrii Nakryiko Acked-by: Vlastimil Babka Tested-by: Naresh Kamboju Signed-off-by: Paul E. McKenney --- mm/util.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/mm/util.c b/mm/util.c index da46f9d..92f23d2 100644 --- a/mm/util.c +++ b/mm/util.c @@ -997,7 +997,12 @@ int __weak memcmp_pages(struct page *page1, struct page *page2) void mem_dump_obj(void *object) { if (!virt_addr_valid(object)) { - pr_cont(" non-paged (local) memory.\n"); + if (object == NULL) + pr_cont(" NULL pointer.\n"); + else if (object == ZERO_SIZE_PTR) + pr_cont(" zero-size pointer.\n"); + else + pr_cont(" non-paged (local) memory.\n"); return; } if (kmem_valid_obj(object)) {