Thread (35 messages) 35 messages, 10 authors, 2019-01-18

Re: [Xen-devel] [PATCH 19/21] treewide: add checks for the return value of memblock_alloc*()

From: Juergen Gross <jgross@suse.com>
Date: 2019-01-16 14:32:20
Also in: linux-alpha, linux-arm-kernel, linux-devicetree, linux-mips, linux-mm, linux-s390, linux-sh, linux-um, linux-usb, lkml, sparclinux

On 16/01/2019 14:44, Mike Rapoport 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 <redacted>
For the Xen part:

Reviewed-by: Juergen Gross <jgross@suse.com>


Juergen
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help