Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp1686762imu; Thu, 17 Jan 2019 01:25:28 -0800 (PST) X-Google-Smtp-Source: ALg8bN6dj2hUwYEfw0+8mfOVCmY/9eNX0j0Lnthcw+sBDHoauFmJ1bqRSoHfL3pbHnsse8jeIjwD X-Received: by 2002:a63:5d55:: with SMTP id o21mr12469187pgm.92.1547717127926; Thu, 17 Jan 2019 01:25:27 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1547717127; cv=none; d=google.com; s=arc-20160816; b=VP1/aWLya9VeS1iAL9+7Q5GBfcGfU5/x4Vlh4vX7BT9Sf3YF7s67/it8cr7Yknne1M gmxI0xeN+lqeSEN0QqQ1A3YJHMDF13fG6aLrMYDyuteoV3Y4mOp9UdKasbR/ckoWmEC6 85C4J7dzJOMi3I/rOeUUssTZsBm/SJ94zRXs0uDN1j3+Gz6IjE/5OhGYOhqsQ3UVXBgl YaSWTpyVuBj4I2a4BF15keMpX6tfpLgprJW11EQIlUmDuaXVoGyYTfZx3BUfBvK7WCvI hjw9ccU0Nh9GfvlaEFUJv7AswVKY+tWI7OmHumCpZOdWNkJ9x3aoqnYc4CJwVjest1KY 9I8w== 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:dkim-signature; bh=4bPnoyaeX51kDmAIcWKpdYgsyUMAHU/THwsKXyYNbh8=; b=rMQO1Fpj05LW2TwFoPmOXcludvOkkBrnX9IqeSLqnmlhOwWjwnx4KPP37vtVYe1Ykr Xjp/LN317QAj/e/tONcp8bcE3XlKx03rGlvDGTDsy53M062hqvlTOmg5RdBTxKdEE2Fv hXWdhgYM0luGyF0Mokg8p9EQRLL8jTfZdLCjw2nQ+PWSLShnkRe5RGy9oqZsJt/tVL6r Zze9ptWl5vfhyPbCsLTQl2K6ikVfeg/Raz04BrZZ99j5Bg4Voh3aVxh9eDNbhoSpU7Iz hFl5HZAcEhnf0PdSwcrprPx/eVhoDrM8Qu44XdgYexWSE9tSS+zIcxncjBP6yUechPnt USrw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=0pw3ulKi; 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=pass (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 193si1089303pgc.220.2019.01.17.01.25.11; Thu, 17 Jan 2019 01:25:27 -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; dkim=pass header.i=@kernel.org header.s=default header.b=0pw3ulKi; 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730431AbfAQHGV (ORCPT + 99 others); Thu, 17 Jan 2019 02:06:21 -0500 Received: from mail.kernel.org ([198.145.29.99]:57760 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730398AbfAQHGT (ORCPT ); Thu, 17 Jan 2019 02:06:19 -0500 Received: from guoren-Inspiron-7460 (23.83.240.247.16clouds.com [23.83.240.247]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 353B920856; Thu, 17 Jan 2019 07:06:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1547708777; bh=YQg5kK0CK1gygp8V+fUKHMM30p/aVFKoBFNquIpl8z4=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=0pw3ulKi3jq4oKmvxSJxzzJsSdMcohB7IigecglkQT5Rx7a1QVi6VMiKG+7/EaK5C /1jqt2buqhHUph/IaPf93BCvJIFaI+XBcHutXpZ8WKrpTTySrlp18ZPjm07/tBc6Eg nedbQORGuNF/Dh36ZedpPIbDbRoH11rc3m/ItgOI= Date: Thu, 17 Jan 2019 15:06:03 +0800 From: Guo Ren To: Mike Rapoport Cc: linux-mm@kvack.org, Andrew Morton , Catalin Marinas , Christoph Hellwig , "David S. Miller" , Dennis Zhou , Geert Uytterhoeven , Greentime Hu , Greg Kroah-Hartman , Guan Xuetao , 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 19/21] treewide: add checks for the return value of memblock_alloc*() Message-ID: <20190117070602.GA31839@guoren-Inspiron-7460> References: <1547646261-32535-1-git-send-email-rppt@linux.ibm.com> <1547646261-32535-20-git-send-email-rppt@linux.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1547646261-32535-20-git-send-email-rppt@linux.ibm.com> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jan 16, 2019 at 03:44:19PM +0200, Mike Rapoport wrote: > arch/csky/mm/highmem.c | 5 +++++ ... > diff --git a/arch/csky/mm/highmem.c b/arch/csky/mm/highmem.c > index 53b1bfa..3317b774 100644 > --- a/arch/csky/mm/highmem.c > +++ b/arch/csky/mm/highmem.c > @@ -141,6 +141,11 @@ static void __init fixrange_init(unsigned long start, unsigned long end, > for (; (k < PTRS_PER_PMD) && (vaddr != end); pmd++, k++) { > if (pmd_none(*pmd)) { > pte = (pte_t *) memblock_alloc_low(PAGE_SIZE, PAGE_SIZE); > + if (!pte) > + panic("%s: Failed to allocate %lu bytes align=%lx\n", > + __func__, PAGE_SIZE, > + PAGE_SIZE); > + > set_pmd(pmd, __pmd(__pa(pte))); > BUG_ON(pte != pte_offset_kernel(pmd, 0)); > } Looks good for me and panic is ok. Reviewed-by: Guo Ren