[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: Geert Uytterhoeven <geert@xxxxxxxxxxxxxx>
- Date: Mon, 21 Jan 2019 09:39:40 +0100
- Cc: Rich Felker <dalias@xxxxxxxx>, "linux-ia64@xxxxxxxxxxxxxxx" <linux-ia64@xxxxxxxxxxxxxxx>, "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" <devicetree@xxxxxxxxxxxxxxx>, Catalin Marinas <catalin.marinas@xxxxxxx>, Heiko Carstens <heiko.carstens@xxxxxxxxxx>, the arch/x86 maintainers <x86@xxxxxxxxxx>, linux-mips@xxxxxxxxxxxxxxx, Max Filippov <jcmvbkbc@xxxxxxxxx>, Guo Ren <guoren@xxxxxxxxxx>, sparclinux <sparclinux@xxxxxxxxxxxxxxx>, Christoph Hellwig <hch@xxxxxx>, linux-s390 <linux-s390@xxxxxxxxxxxxxxx>, linux-c6x-dev@xxxxxxxxxxxxx, Yoshinori Sato <ysato@xxxxxxxxxxxxxxxxxxxx>, Richard Weinberger <richard@xxxxxx>, Linux-sh list <linux-sh@xxxxxxxxxxxxxxx>, Russell King <linux@xxxxxxxxxxxxxxx>, kasan-dev@xxxxxxxxxxxxxxxx, Mark Salter <msalter@xxxxxxxxxx>, Dennis Zhou <dennis@xxxxxxxxxx>, Matt Turner <mattst88@xxxxxxxxx>, arcml <linux-snps-arc@xxxxxxxxxxxxxxxxxxx>, "moderated list:H8/300 ARCHITECTURE" <uclinux-h8-devel@xxxxxxxxxxxxxxxxxxxx>, Petr Mladek <pmladek@xxxxxxxx>, linux-xtensa@xxxxxxxxxxxxxxxx, alpha <linux-alpha@xxxxxxxxxxxxxxx>, linux-um@xxxxxxxxxxxxxxxxxxx, linux-m68k <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 <linux-arm-kernel@xxxxxxxxxxxxxxxxxxx>, Michal Simek <monstr@xxxxxxxxx>, Tony Luck <tony.luck@xxxxxxxxx>, Linux MM <linux-mm@xxxxxxxxx>, Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>, USB list <linux-usb@xxxxxxxxxxxxxxx>, Linux Kernel Mailing List <linux-kernel@xxxxxxxxxxxxxxx>, Paul Burton <paul.burton@xxxxxxxx>, Vineet Gupta <vgupta@xxxxxxxxxxxx>, Michael Ellerman <mpe@xxxxxxxxxxxxxx>, Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>, linuxppc-dev <linuxppc-dev@xxxxxxxxxxxxxxxx>, "David S. Miller" <davem@xxxxxxxxxxxxx>, Openrisc <openrisc@xxxxxxxxxxxxxxxxxxxx>
- Delivery-date: Mon, 21 Jan 2019 08:40:04 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
On Mon, Jan 21, 2019 at 9: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>
> arch/m68k/atari/stram.c | 4 ++++
> arch/m68k/mm/init.c | 3 +++
> arch/m68k/mm/mcfmmu.c | 6 ++++++
> arch/m68k/mm/motorola.c | 9 +++++++++
> arch/m68k/mm/sun3mmu.c | 6 ++++++
> arch/m68k/sun3/sun3dvma.c | 3 +++
For m68k:
Reviewed-by: Geert Uytterhoeven <geert@xxxxxxxxxxxxxx>
Acked-by: Geert Uytterhoeven <geert@xxxxxxxxxxxxxx>
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@xxxxxxxxxxxxxx
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel
|