From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753959AbdAZVxG (ORCPT ); Thu, 26 Jan 2017 16:53:06 -0500 Received: from mail.linuxfoundation.org ([140.211.169.12]:43030 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753746AbdAZVxD (ORCPT ); Thu, 26 Jan 2017 16:53:03 -0500 Date: Thu, 26 Jan 2017 13:52:54 -0800 From: Andrew Morton To: Toshi Kani Cc: gregkh@linuxfoundation.org, linux-mm@kvack.org, zhenzhang.zhang@huawei.com, arbab@linux.vnet.ibm.com, dan.j.williams@intel.com, abanman@sgi.com, rientjes@google.com, linux-kernel@vger.kernel.org Subject: Re: [PATCH 2/2] base/memory, hotplug: fix a kernel oops in show_valid_zones() Message-Id: <20170126135254.cbd0bdbe3cdc5910c288ad32@linux-foundation.org> In-Reply-To: <20170126214415.4509-3-toshi.kani@hpe.com> References: <20170126214415.4509-1-toshi.kani@hpe.com> <20170126214415.4509-3-toshi.kani@hpe.com> X-Mailer: Sylpheed 3.4.1 (GTK+ 2.24.23; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 26 Jan 2017 14:44:15 -0700 Toshi Kani wrote: > Reading a sysfs memoryN/valid_zones file leads to the following > oops when the first page of a range is not backed by struct page. > show_valid_zones() assumes that 'start_pfn' is always valid for > page_zone(). > > BUG: unable to handle kernel paging request at ffffea017a000000 > IP: show_valid_zones+0x6f/0x160 > > Since test_pages_in_a_zone() already checks holes, extend this > function to return 'valid_start' and 'valid_end' for a given range. > show_valid_zones() then proceeds with the valid range. This doesn't apply to current mainline due to changes in zone_can_shift(). Please redo and resend. Please also update the changelog to provide sufficient information for others to decide which kernel(s) need the fix. In particular: under what circumstances will it occur? On real machines which real people own?