Skip to contentSkip to conversation

don't panic on failed bootmem alloc

PATCH In review Steven Rostedt 2 participants 2 messages Dec 6, 2007

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 don't panic on failed bootmem alloc

Ingo,

This patch prevents a panic on a failed bootmem alloc in the initialization of the tracer buffers.

kernel/latency_trace.c +3 -2
Index: linux-2.6-latency/kernel/latency_trace.c
===================================================================
@@ -2720,10 +2720,11 @@ void * __init tracer_alloc_bootmem(unsig
 {
 	void * ret;
 
-	ret =__alloc_bootmem(size, SMP_CACHE_BYTES, ARCH_LOW_ADDRESS_LIMIT);
+	ret =__alloc_bootmem_nopanic(size, SMP_CACHE_BYTES,
+				     ARCH_LOW_ADDRESS_LIMIT);
 	if (ret != NULL && ((unsigned long)ret) < ARCH_LOW_ADDRESS_LIMIT) {
 		free_bootmem(__pa(ret), size);
-		ret = __alloc_bootmem(size,
+		ret = __alloc_bootmem_nopanic(size,
 				SMP_CACHE_BYTES,
 				__pa(MAX_DMA_ADDRESS));
 	}
#1 lore raw
Quoted 4 lines · Steven Rostedt

Ingo,

This patch prevents a panic on a failed bootmem alloc in the initialization of the tracer buffers.

thanks, good catch!

Ingo