Re: #PF from NMI

From: Steven Rostedt
Date: Mon Nov 16 2020 - 11:46:54 EST


On Sat, 14 Nov 2020 00:13:58 +0100
Thomas Gleixner <tglx@xxxxxxxxxxxxx> wrote:

> nmi:
> ...
> trace_hardirqs_off_finish() {
> if (!this_cpu_read(tracing_irq_cpu)) {
> this_cpu_write(tracing_irq_cpu, 1);
> ...
> }
> ...
> perf()
>
> #PF
> save_cr2()
>
> irqentry_enter()
> trace_hardirqs_off_finish()
> if (!this_cpu_read(tracing_irq_cpu)) {
>
> So yes, it is recursion protected unless I'm missing something.

That should work.

-- Steve