Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp722402imu; Fri, 25 Jan 2019 09:46:57 -0800 (PST) X-Google-Smtp-Source: ALg8bN4twJhdp6n5PN4RgptKU65IGMGITeVr7Dif9/8cjr0yxSDyAw1ZBo5Tw1zZPJxr6keSma5N X-Received: by 2002:a63:3e05:: with SMTP id l5mr3968365pga.96.1548438417938; Fri, 25 Jan 2019 09:46:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548438417; cv=none; d=google.com; s=arc-20160816; b=MTjGjJ9hBDC3SDdm4Vs63LpfcH8olCNDdlELj7MdPWXLMgCyfbFIb8kqu0TjIj5a8j n/C5+iH90zZwdoK9ldIUhjNvXDeblZSIhKhiZvcdCHZfcvIDFllSZyAFuxhpTuFZZOeO EhHejYFegow2IL2UI8pTE9URLl7ni0SdPa2GK52XQYB2CfeEVjMyIKkKmnt/DBA6W/op peO5zXj+8NkscUZd66/VI2NuMG06PbMOQlIUgI73XLtO73X7ZOHerJ0e/72juABufmv2 NJafeAxoe+EfOT9fL8pVRxBFIswecL3HPXsXRszwvnwhHUs5P0w05dy3U3Xfn7VkqhcK cOuQ== 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; bh=WccuO7LhRHr+zk/i/HIf7QoLtehqLahIPhQpS0A6PmQ=; b=OlSrrbDqSBRQ/P8YR/TPG63GuCeUUnf0uqC3Eiqqq67vZsS/cN94GwJjHKRip7+LtU CIYBFZCUfl/J4M39T8LUKfU+SLG0H9nu5kfS57OtxMDb4Zr4/SIPxpnf/NsxOyNTR4L7 jOz4ZwTcYzTCJrPLX6pMIdEcKgZsuyL7A0A81KdDF8VvkROSZp9aVYBItbzwbKE41+sk 7NCarRBgyts8q7hHKhrneIgzfR8NxWZgVh5f76zJvGMCoMTIR0v8VbjSEdsII1Bkv794 s6xM9KsrSOhzYGa0/rcO1BEyZVd0fPdR2VeIP7pyMHTqlBmQzLenQWsHZG3dmzLxuJ+K XqEw== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e37si26145789plb.172.2019.01.25.09.46.42; Fri, 25 Jan 2019 09:46:57 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729323AbfAYRpO (ORCPT + 99 others); Fri, 25 Jan 2019 12:45:14 -0500 Received: from usa-sjc-mx-foss1.foss.arm.com ([217.140.101.70]:51232 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726311AbfAYRpN (ORCPT ); Fri, 25 Jan 2019 12:45:13 -0500 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id CB5EBEBD; Fri, 25 Jan 2019 09:45:12 -0800 (PST) Received: from arrakis.emea.arm.com (arrakis.cambridge.arm.com [10.1.196.113]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 76CBD3F5AF; Fri, 25 Jan 2019 09:45:05 -0800 (PST) Date: Fri, 25 Jan 2019 17:45:02 +0000 From: Catalin Marinas To: Mike Rapoport Cc: linux-mm@kvack.org, Andrew Morton , Christoph Hellwig , "David S. Miller" , Dennis Zhou , Geert Uytterhoeven , Greentime Hu , Greg Kroah-Hartman , Guan Xuetao , Guo Ren , Heiko Carstens , Mark Salter , Matt Turner , Max Filippov , Michael Ellerman , Michal Simek , Paul Burton , Petr Mladek , Rich Felker , Richard Weinberger , Rob Herring , Russell King , Stafford Horne , Tony Luck , Vineet Gupta , Yoshinori Sato , devicetree@vger.kernel.org, kasan-dev@googlegroups.com, linux-alpha@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-c6x-dev@linux-c6x.org, linux-ia64@vger.kernel.org, linux-kernel@vger.kernel.org, linux-m68k@lists.linux-m68k.org, linux-mips@vger.kernel.org, linux-s390@vger.kernel.org, linux-sh@vger.kernel.org, linux-snps-arc@lists.infradead.org, linux-um@lists.infradead.org, linux-usb@vger.kernel.org, linux-xtensa@linux-xtensa.org, linuxppc-dev@lists.ozlabs.org, openrisc@lists.librecores.org, sparclinux@vger.kernel.org, uclinux-h8-devel@lists.sourceforge.jp, x86@kernel.org, xen-devel@lists.xenproject.org Subject: Re: [PATCH v2 06/21] memblock: memblock_phys_alloc_try_nid(): don't panic Message-ID: <20190125174502.GL25901@arrakis.emea.arm.com> References: <1548057848-15136-1-git-send-email-rppt@linux.ibm.com> <1548057848-15136-7-git-send-email-rppt@linux.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1548057848-15136-7-git-send-email-rppt@linux.ibm.com> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jan 21, 2019 at 10:03:53AM +0200, Mike Rapoport wrote: > diff --git a/arch/arm64/mm/numa.c b/arch/arm64/mm/numa.c > index ae34e3a..2c61ea4 100644 > --- a/arch/arm64/mm/numa.c > +++ b/arch/arm64/mm/numa.c > @@ -237,6 +237,10 @@ static void __init setup_node_data(int nid, u64 start_pfn, u64 end_pfn) > pr_info("Initmem setup node %d []\n", nid); > > nd_pa = memblock_phys_alloc_try_nid(nd_size, SMP_CACHE_BYTES, nid); > + if (!nd_pa) > + panic("Cannot allocate %zu bytes for node %d data\n", > + nd_size, nid); > + > nd = __va(nd_pa); > > /* report and initialize */ Does it mean that memblock_phys_alloc_try_nid() never returns valid physical memory starting at 0? -- Catalin