diff --git a/kernel/lockdep.c b/kernel/lockdep.c
index 900b4cb1a0245a9e926b921e4e49dfdd107a73ae..c088e5542e84074d3f784108805c841c162b0ce9 100644
--- a/kernel/lockdep.c
+++ b/kernel/lockdep.c
@@ -227,7 +227,11 @@ static int save_trace(struct stack_trace *trace)
 	trace->skip = 3;
 	trace->all_contexts = 0;
 
+	/* Make sure to not recurse in case the the unwinder needs to tak
+e	   locks. */
+	lockdep_off();
 	save_stack_trace(trace, NULL);
+	lockdep_on();
 
 	trace->max_entries = trace->nr_entries;