Re: [PATCH] ftrace: protect running nmi (V3)

From: Steven Rostedt
Date: Wed Mar 18 2009 - 20:34:14 EST



On Wed, 2009-03-18 at 16:42 +0800, Lai Jiangshan wrote:

>
> +static void wait_for_nmi_and_set_mod_flag(void)
> +{
> + if (!atomic_cmpxchg(&nmi_running, 0, MOD_CODE_WRITE_FLAG))
> + rerurn;

You might want to compile check patches before sending. I'll look this
patch over in detail, and make the necessary fixes.

-- Steve

> +
> + do {
> + cpu_relax();
> + } while (atomic_cmpxchg(&nmi_running, 0, MOD_CODE_WRITE_FLAG));
> +
> + nmi_wait_count++;
> +}
> +

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/