Esempio n. 1
0
unsigned __kprobes long oops_begin(void)
{
	int cpu;
	unsigned long flags;

	
	trace_hw_branch_oops();

	oops_enter();

	
	raw_local_irq_save(flags);
	cpu = smp_processor_id();
	if (!__raw_spin_trylock(&die_lock)) {
		if (cpu == die_owner)
			;
		else
			__raw_spin_lock(&die_lock);
	}
	die_nest_count++;
	die_owner = cpu;
	console_verbose();
	bust_spinlocks(1);
	return flags;
}
Esempio n. 2
0
unsigned __kprobes long oops_begin(void)
{
	int cpu;
	unsigned long flags;

	/* notify the hw-branch tracer so it may disable tracing and
	   add the last trace to the trace buffer -
	   the earlier this happens, the more useful the trace. */
	trace_hw_branch_oops();

	oops_enter();

	/* racy, but better than risking deadlock. */
	raw_local_irq_save(flags);
	cpu = smp_processor_id();
	if (!arch_spin_trylock(&die_lock)) {
		if (cpu == die_owner)
			/* nested oops. should stop eventually */;
		else
			arch_spin_lock(&die_lock);
	}
	die_nest_count++;
	die_owner = cpu;
	console_verbose();
	bust_spinlocks(1);
	return flags;
}