summaryrefslogtreecommitdiff
path: root/mm/memblock.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2023-11-08 09:40:13 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2023-11-08 09:40:13 -0800
commit447cec034b7896f4b19dbfe3ce6c366ce7c7602a (patch)
treefcb35daa4a59d4f1c7ca2e656eac4ef1f849ac55 /mm/memblock.c
parentc1ef4df14ed1feb9b0f08508390a196a1bc530ce (diff)
parente96c6b8f212a510c9b22362de519f6e1d7920de5 (diff)
Merge tag 'memblock-v6.7-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rppt/memblock
Pull memblock update from Mike Rapoport: "Report failures when memblock_can_resize is not set. Numerous memblock reservations at early boot may exhaust static memblock.reserved array and it is unnoticed because most of the callers don't check memblock_reserve() return value. In this case the system will crash later, but the reason is hard to identify. Replace return of an error with panic() when memblock.reserved is exhausted before it can be resized" * tag 'memblock-v6.7-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rppt/memblock: memblock: report failures when memblock_can_resize is not set
Diffstat (limited to 'mm/memblock.c')
-rw-r--r--mm/memblock.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/mm/memblock.c b/mm/memblock.c
index fd492e5bbdbc..5a88d6d24d79 100644
--- a/mm/memblock.c
+++ b/mm/memblock.c
@@ -424,7 +424,7 @@ static int __init_memblock memblock_double_array(struct memblock_type *type,
* of memory that aren't suitable for allocation
*/
if (!memblock_can_resize)
- return -1;
+ panic("memblock: cannot resize %s array\n", type->name);
/* Calculate new doubled size */
old_size = type->max * sizeof(struct memblock_region);