[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Xen-devel] [PATCH v2 19/21] treewide: add checks for the return value of memblock_alloc*()
- To: Mike Rapoport <rppt@xxxxxxxxxxxxx>
- From: Max Filippov <jcmvbkbc@xxxxxxxxx>
- Date: Thu, 31 Jan 2019 07:23:02 -0800
- Cc: Rich Felker <dalias@xxxxxxxx>, "open list:IA64 \(Itanium\) PL..." <linux-ia64@xxxxxxxxxxxxxxx>, devicetree@xxxxxxxxxxxxxxx, Catalin Marinas <catalin.marinas@xxxxxxx>, Heiko Carstens <heiko.carstens@xxxxxxxxxx>, "maintainer:X86 ARCHITECTURE..." <x86@xxxxxxxxxx>, linux-mips@xxxxxxxxxxxxxxx, linux-mm@xxxxxxxxx, Guo Ren <guoren@xxxxxxxxxx>, "open list:SPARC + UltraSPAR..." <sparclinux@xxxxxxxxxxxxxxx>, Christoph Hellwig <hch@xxxxxx>, linux-s390 <linux-s390@xxxxxxxxxxxxxxx>, linux-c6x-dev@xxxxxxxxxxxxx, Yoshinori Sato <ysato@xxxxxxxxxxxxxxxxxxxx>, Richard Weinberger <richard@xxxxxx>, "open list:SUPERH" <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, "moderated list:H8/300 ARCHITECTURE" <uclinux-h8-devel@xxxxxxxxxxxxxxxxxxxx>, Petr Mladek <pmladek@xxxxxxxx>, linux-xtensa@xxxxxxxxxxxxxxxx, "open list:ALPHA PORT" <linux-alpha@xxxxxxxxxxxxxxx>, linux-um@xxxxxxxxxxxxxxxxxxx, "open list:M68K ARCHITECTURE" <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>, Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>, USB list <linux-usb@xxxxxxxxxxxxxxx>, LKML <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, 31 Jan 2019 15:40:56 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
On Mon, Jan 21, 2019 at 12:06 AM Mike Rapoport <rppt@xxxxxxxxxxxxx> wrote:
>
> Add check for the return value of memblock_alloc*() functions and call
> panic() in case of error.
> The panic message repeats the one used by panicing memblock allocators with
> adjustment of parameters to include only relevant ones.
>
> The replacement was mostly automated with semantic patches like the one
> below with manual massaging of format strings.
>
> @@
> expression ptr, size, align;
> @@
> ptr = memblock_alloc(size, align);
> + if (!ptr)
> + panic("%s: Failed to allocate %lu bytes align=0x%lx\n", __func__,
> size, align);
>
> Signed-off-by: Mike Rapoport <rppt@xxxxxxxxxxxxx>
> Reviewed-by: Guo Ren <ren_guo@xxxxxxxxx> # c-sky
> Acked-by: Paul Burton <paul.burton@xxxxxxxx> # MIPS
> Acked-by: Heiko Carstens <heiko.carstens@xxxxxxxxxx> # s390
> Reviewed-by: Juergen Gross <jgross@xxxxxxxx> # Xen
> ---
> arch/xtensa/mm/kasan_init.c | 4 ++++
> arch/xtensa/mm/mmu.c | 3 +++
For xtensa:
Acked-by: Max Filippov <jcmvbkbc@xxxxxxxxx>
--
Thanks.
-- Max
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel
|