Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp4493133imu; Tue, 29 Jan 2019 02:30:43 -0800 (PST) X-Google-Smtp-Source: ALg8bN5av5Ie/2F809GYRDFxzwbVD7w2gwu/yODwxDxi69vNDCTJL+xTrlBH3U5IYsP4XiHYvwZD X-Received: by 2002:a63:66c6:: with SMTP id a189mr23223813pgc.167.1548757842982; Tue, 29 Jan 2019 02:30:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548757842; cv=none; d=google.com; s=arc-20160816; b=aCJFSHGkZiO6EKwMQBI5o7RBYtjZmUBU99EusZkaqnymkCFhbKpbV+dtuRL4hjNX6x QmTQHOUFm6FK+Zc32S17ka81d4BxCJ4kG986P9QjVwMmuiGihG/H12v959cXmvW10OmY 7QkZRioiAA3tqfQgJ4lg6xE9S/+QJw/9/K+DMCAu5Ohs2eSNaMIZGWiCQgYyn82H7SLl 1GTTAAe2K078QTybXeKOlFCo282Kqmz5/i8b3XaPe4mo1X9AL8iuhMfNfGYbgZ7qxnWa 11j1ciVIP5FIDqO3V5cqXVrK7/EgoluMNqWa09l5a6yk56Zjog60pE5LzvrzgNIfJH+Y D4Tg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from; bh=umrS+ZyRHatmUJD188ntGaiZ2jPJqpgQAXJ8bPgP9gI=; b=bUfmNW56+tSsId2h6f42nifmhP+jX2vAIrdDtLACmYmozSyfkozPrVCtEM34v9L8LN s02XVq4XOIcGS2jq/V00S5Vk1bF18bVmFriKahjMZQFBXEt/RdOpVIlCpG2aRpOjMQHW Pvw0sntvSX+wYy43e3yab1aSuVPf6h5l5B0AKFRuKFXI1eWroamtAaFu6O9VEmmZ/EAB ndVyYupJZeet+jCLargVF4op76AES/O3cN7GrXpp5jSKEZXwv2WGT8ygXubBRCCTuMwe cweXiiQaDHw/q7UoJUziR1p48OiWVaN7H4IYZIoJxQdmeUPDbpkLjBZbTPtd3b3DOVSJ WDaQ== 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 g22si34495184pfj.222.2019.01.29.02.30.27; Tue, 29 Jan 2019 02:30:42 -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 S1728422AbfA2K3a (ORCPT + 99 others); Tue, 29 Jan 2019 05:29:30 -0500 Received: from ozlabs.org ([203.11.71.1]:38999 "EHLO ozlabs.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726997AbfA2K33 (ORCPT ); Tue, 29 Jan 2019 05:29:29 -0500 Received: from authenticated.ozlabs.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPSA id 43pjR63G0Gz9sNG; Tue, 29 Jan 2019 21:29:22 +1100 (AEDT) From: Michael Ellerman To: Mike Rapoport , linux-mm@kvack.org Cc: Andrew Morton , Catalin Marinas , 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 , 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, Mike Rapoport Subject: Re: [PATCH v2 09/21] memblock: drop memblock_alloc_base() In-Reply-To: <1548057848-15136-10-git-send-email-rppt@linux.ibm.com> References: <1548057848-15136-1-git-send-email-rppt@linux.ibm.com> <1548057848-15136-10-git-send-email-rppt@linux.ibm.com> Date: Tue, 29 Jan 2019 21:29:19 +1100 Message-ID: <87sgxbrc3k.fsf@concordia.ellerman.id.au> MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Mike Rapoport writes: > The memblock_alloc_base() function tries to allocate a memory up to the > limit specified by its max_addr parameter and panics if the allocation > fails. Replace its usage with memblock_phys_alloc_range() and make the > callers check the return value and panic in case of error. > > Signed-off-by: Mike Rapoport > --- > arch/powerpc/kernel/rtas.c | 6 +++++- > arch/powerpc/mm/hash_utils_64.c | 8 ++++++-- > arch/s390/kernel/smp.c | 6 +++++- > drivers/macintosh/smu.c | 2 +- > include/linux/memblock.h | 2 -- > mm/memblock.c | 14 -------------- > 6 files changed, 17 insertions(+), 21 deletions(-) Acked-by: Michael Ellerman (powerpc) cheers