Received: by 2002:ac0:a581:0:0:0:0:0 with SMTP id m1-v6csp311375imm; Mon, 2 Jul 2018 11:58:38 -0700 (PDT) X-Google-Smtp-Source: AAOMgpehV2NWTkC90/9TklM5rLwzfK2vDUjnMNXRApBkC2+eu10ghvHkHT4IBJ6J1V0aDZnKtufb X-Received: by 2002:a17:902:64c2:: with SMTP id y2-v6mr23396548pli.53.1530557918805; Mon, 02 Jul 2018 11:58:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530557918; cv=none; d=google.com; s=arc-20160816; b=TcJyJfRwEgUH7vKOE+r8uUUJSIcO8aABt7NWbHiLPwGur7rqKphR2mqXVOtQbXxFEY W2eH32BaDuno2gJtg9CxLqAfrXl4hV+hc5gY1oreGOvQT2bx0HMVzNAaYclfT2KjZ3Xg p3vccbfFQVdwFIaXZrlSzd4o0xvpV1dyOZgECFwC/lI5u8LX3roDUJCqwVTdMREJ9n7i qUTkHVOGazhKIbvX8imEu+bEzcqJ8w1T5B5a5qDlowBBWtqmK+lDdg7DbycXP3Hlbrfs 9XUV8f38CwifiJxGF+tcjJnsqOWf0qoalldgq4sd93L4r7S6V/pwOXGp614nD2bDXUi2 4nkw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:arc-authentication-results; bh=JGKruSbK3Jwiax/ZIMiQcnne+P1oSRAvYXC+IosRXi4=; b=Ew6UNeGPf3CT4Ga4JYntTugDPLHgvCtEvMYgmNm75/XQIYBvqotnhjJ6VI+5AamCjX pLxtYxv8c3PtuDJl0bqAvfTFMulCXpzRDdk1Ur402SJNuuoGS1M/aslVoyYduuRsApNa KLKhbcFUU8O0DoyWuG5ceYo68WmPwS+IIfBLhpf0OScVRnrY81rQFPT3GnJqSNZUv959 m5J8p+aD0AsGKaceTxZvxQ8Rf+RNbTARXPz33RgffYV0qtxi7MkG2M6HFTPnF9MXZtNp tSJWarvFPVoVN+gyjbwg8YYc6d7/ylP0lw7no64HC18CJx2gzuvhXNPYgkSGHs3NVAHN N04g== 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=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 5-v6si15027989pgb.430.2018.07.02.11.58.24; Mon, 02 Jul 2018 11:58:38 -0700 (PDT) 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753417AbeGBS4S (ORCPT + 99 others); Mon, 2 Jul 2018 14:56:18 -0400 Received: from mx2.suse.de ([195.135.220.15]:35476 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1753162AbeGBS4R (ORCPT ); Mon, 2 Jul 2018 14:56:17 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay1.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id A3EC9AD2E; Mon, 2 Jul 2018 18:56:15 +0000 (UTC) Date: Mon, 2 Jul 2018 20:56:12 +0200 From: Michal Hocko To: Pavel Tatashin Cc: steven.sistare@oracle.com, daniel.m.jordan@oracle.com, linux-kernel@vger.kernel.org, akpm@linux-foundation.org, kirill.shutemov@linux.intel.com, linux-mm@kvack.org, mgorman@techsingularity.net, gregkh@linuxfoundation.org Subject: Re: [PATCH v2] mm: teach dump_page() to correctly output poisoned struct pages Message-ID: <20180702185612.GJ19043@dhcp22.suse.cz> References: <20180702180536.2552-1-pasha.tatashin@oracle.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180702180536.2552-1-pasha.tatashin@oracle.com> User-Agent: Mutt/1.10.0 (2018-05-17) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon 02-07-18 14:05:36, Pavel Tatashin wrote: [...] > void __dump_page(struct page *page, const char *reason) > { > + bool page_poisoned = PagePoisoned(page); > + int mapcount; > + > + /* > + * If struct page is poisoned don't access Page*() functions as that > + * leads to recursive loop. Page*() check for poisoned pages, and calls > + * dump_page() when detected. > + */ > + if (page_poisoned) { > + pr_emerg("page:%px is uninitialized and poisoned", page); > + goto hex_only; > + } Thanks for the updated comment. Exactly what I was looking for! -- Michal Hocko SUSE Labs