[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Xen-devel] [PATCH 19/21] treewide: add checks for the return value of memblock_alloc*()
- To: Mike Rapoport <rppt@xxxxxxxxxxxxx>
- From: Guo Ren <guoren@xxxxxxxxxx>
- Date: Thu, 17 Jan 2019 15:06:03 +0800
- Cc: Rich Felker <dalias@xxxxxxxx>, linux-ia64@xxxxxxxxxxxxxxx, devicetree@xxxxxxxxxxxxxxx, Catalin Marinas <catalin.marinas@xxxxxxx>, Heiko Carstens <heiko.carstens@xxxxxxxxxx>, x86@xxxxxxxxxx, linux-mips@xxxxxxxxxxxxxxx, Max Filippov <jcmvbkbc@xxxxxxxxx>, sparclinux@xxxxxxxxxxxxxxx, Christoph Hellwig <hch@xxxxxx>, linux-s390@xxxxxxxxxxxxxxx, linux-c6x-dev@xxxxxxxxxxxxx, Yoshinori Sato <ysato@xxxxxxxxxxxxxxxxxxxx>, Richard Weinberger <richard@xxxxxx>, linux-sh@xxxxxxxxxxxxxxx, Russell King <linux@xxxxxxxxxxxxxxx>, kasan-dev@xxxxxxxxxxxxxxxx, Geert Uytterhoeven <geert@xxxxxxxxxxxxxx>, Mark Salter <msalter@xxxxxxxxxx>, Dennis Zhou <dennis@xxxxxxxxxx>, Matt Turner <mattst88@xxxxxxxxx>, linux-snps-arc@xxxxxxxxxxxxxxxxxxx, uclinux-h8-devel@xxxxxxxxxxxxxxxxxxxx, Petr Mladek <pmladek@xxxxxxxx>, linux-xtensa@xxxxxxxxxxxxxxxx, linux-alpha@xxxxxxxxxxxxxxx, linux-um@xxxxxxxxxxxxxxxxxxx, linux-m68k@xxxxxxxxxxxxxxxxxxxx, Rob Herring <robh+dt@xxxxxxxxxx>, Greentime Hu <green.hu@xxxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx, Stafford Horne <shorne@xxxxxxxxx>, Guan Xuetao <gxt@xxxxxxxxxx>, linux-arm-kernel@xxxxxxxxxxxxxxxxxxx, Michal Simek <monstr@xxxxxxxxx>, Tony Luck <tony.luck@xxxxxxxxx>, linux-mm@xxxxxxxxx, Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>, linux-usb@xxxxxxxxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx, Paul Burton <paul.burton@xxxxxxxx>, Vineet Gupta <vgupta@xxxxxxxxxxxx>, Michael Ellerman <mpe@xxxxxxxxxxxxxx>, Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>, linuxppc-dev@xxxxxxxxxxxxxxxx, "David S. Miller" <davem@xxxxxxxxxxxxx>, openrisc@xxxxxxxxxxxxxxxxxxxx
- Delivery-date: Thu, 17 Jan 2019 07:17:47 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.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 <ren_guo@xxxxxxxxx>
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel
|