diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c
index 528971714fc65d30346c6fb0f4d2d05b0457f1a3..daa96215e29486da12699fba990be5f0f78ea786 100644
--- a/kernel/trace/trace.c
+++ b/kernel/trace/trace.c
@@ -3132,7 +3132,7 @@ static char *get_trace_buf(void)
 
 	/* Interrupts must see nesting incremented before we use the buffer */
 	barrier();
-	return &buffer->buffer[buffer->nesting][0];
+	return &buffer->buffer[buffer->nesting - 1][0];
 }
 
 static void put_trace_buf(void)