[PATCH] mm/sparse: don't panic if the allocation in sparse_buffer_init fails
From: Mike Rapoport
Date: Thu Jan 31 2019 - 02:18:50 EST
Addition of panic if memblock_alloc_try_nid_raw() call in
sparse_buffer_init() fails was over enthusiastic as the system is perfectly
capable to deal with that allocation failure.
Remove the panic().
Signed-off-by: Mike Rapoport <rppt@xxxxxxxxxxxxx>
---
mm/sparse.c | 4 ----
1 file changed, 4 deletions(-)
diff --git a/mm/sparse.c b/mm/sparse.c
index 1471f06..c11aba0 100644
--- a/mm/sparse.c
+++ b/mm/sparse.c
@@ -434,10 +434,6 @@ static void __init sparse_buffer_init(unsigned long size, int nid)
memblock_alloc_try_nid_raw(size, PAGE_SIZE,
__pa(MAX_DMA_ADDRESS),
MEMBLOCK_ALLOC_ACCESSIBLE, nid);
- if (!sparsemap_buf)
- panic("%s: Failed to allocate %lu bytes align=0x%lx nid=%d from=%lx\n",
- __func__, size, PAGE_SIZE, nid, __pa(MAX_DMA_ADDRESS));
-
sparsemap_buf_end = sparsemap_buf + size;
}
--
2.7.4