From: William Lee Irwin III On some arches, e.g. ia64, it appears that timer ticks can be taken very, very early. In order to avoid oopsing on a prof_buffer that hasn't yet been bootmem allocated, check prof_buffer in profile_hit(). Signed-off-by: Andrew Morton --- 25-akpm/kernel/profile.c | 2 +- 1 files changed, 1 insertion(+), 1 deletion(-) diff -puN kernel/profile.c~early-profiling-oops-fix kernel/profile.c --- 25/kernel/profile.c~early-profiling-oops-fix Thu Aug 5 14:50:02 2004 +++ 25-akpm/kernel/profile.c Thu Aug 5 14:50:02 2004 @@ -176,7 +176,7 @@ void profile_hit(int type, void *__pc) { unsigned long pc; - if (prof_on != type) + if (prof_on != type || !prof_buffer) return; pc = ((unsigned long)__pc - (unsigned long)_stext) >> prof_shift; atomic_inc((atomic_t *)&prof_buffer[min(pc, prof_len - 1)]); _