From mboxrd@z Thu Jan 1 00:00:00 1970 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=-0.8 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS autolearn=no 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 054B0C352A9 for ; Thu, 26 Sep 2019 22:45:12 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 95E8B207E0 for ; Thu, 26 Sep 2019 22:45:11 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=kernel.org header.i=@kernel.org header.b="PXvulo9F" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 95E8B207E0 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=linux-foundation.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 090178E0025; Thu, 26 Sep 2019 18:45:11 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 041D86B027F; Thu, 26 Sep 2019 18:45:10 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id E98E18E0025; Thu, 26 Sep 2019 18:45:10 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0132.hostedemail.com [216.40.44.132]) by kanga.kvack.org (Postfix) with ESMTP id C82356B027E for ; Thu, 26 Sep 2019 18:45:10 -0400 (EDT) Received: from smtpin20.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with SMTP id 78210180AD803 for ; Thu, 26 Sep 2019 22:45:10 +0000 (UTC) X-FDA: 75978553980.20.start62_847222687bc5b X-HE-Tag: start62_847222687bc5b X-Filterd-Recvd-Size: 2898 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by imf36.hostedemail.com (Postfix) with ESMTP for ; Thu, 26 Sep 2019 22:45:10 +0000 (UTC) Received: from localhost.localdomain (c-73-231-172-41.hsd1.ca.comcast.net [73.231.172.41]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id A0F33207E0; Thu, 26 Sep 2019 22:45:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1569537908; bh=rQC3J8EPwzkHKWjOg8mvpEytGCu5pe1CrK00J5y86/I=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=PXvulo9Fu5ero0Z/ID0ePs5iVDl9ix284AJhH+ldQuSxyxoK6ed2yrgHTpKFmqrrU 4Q5XkaHWMvQ/NRvbKoNRWlKYMcW/KAq470h5mVAUlgN9hl4t2JOdLm3KZcnFwQzYyI ntxKH5qMSbx3V4AvMoxU13ndZpwmM5sEUKNJ04gc= Date: Thu, 26 Sep 2019 15:45:08 -0700 From: Andrew Morton To: "Aneesh Kumar K.V" Cc: dan.j.williams@intel.com, David Hildenbrand , linux-nvdimm@lists.01.org, linux-mm@kvack.org Subject: Re: [PATCH 1/2] mm/memunmap: Use the correct start and end pfn when removing pages from zone Message-Id: <20190926154508.3dba3dc398b7bb9a40ba15da@linux-foundation.org> In-Reply-To: <20190926122552.17905-1-aneesh.kumar@linux.ibm.com> References: <20190830091428.18399-1-david@redhat.com> <20190926122552.17905-1-aneesh.kumar@linux.ibm.com> X-Mailer: Sylpheed 3.5.1 (GTK+ 2.24.31; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit 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: On Thu, 26 Sep 2019 17:55:51 +0530 "Aneesh Kumar K.V" wrote: > With altmap, all the resource pfns are not initialized. While initializing > pfn, altmap reserve space is skipped. Hence when removing pfn from zone skip > pfns that were never initialized. > > Update memunmap_pages to calculate start and end pfn based on altmap > values. This fixes a kernel crash that is observed when destroying namespace. > > [ 74.745056] BUG: Unable to handle kernel data access at 0xc00c000001400000 > [ 74.745256] Faulting instruction address: 0xc0000000000b58b0 > cpu 0x2: Vector: 300 (Data Access) at [c00000026ea93580] > pc: c0000000000b58b0: memset+0x68/0x104 > lr: c0000000003eb008: page_init_poison+0x38/0x50 > ... > current = 0xc000000271c67d80 > paca = 0xc00000003fffd680 irqmask: 0x03 irq_happened: 0x01 > pid = 3665, comm = ndctl > [link register ] c0000000003eb008 page_init_poison+0x38/0x50 > [c00000026ea93830] c0000000004754d4 remove_pfn_range_from_zone+0x64/0x3e0 > [c00000026ea938a0] c0000000004b8a60 memunmap_pages+0x300/0x400 > [c00000026ea93930] c0000000009e32a0 devm_action_release+0x30/0x50 Doesn't apply to mainline or -next. Which tree is this against?