Re: [PATCH] x86,nmi: Fix page faults by nmiaction if kmemcheck isenabled

From: Peter Zijlstra
Date: Thu Mar 08 2012 - 14:42:55 EST


On Thu, 2012-03-08 at 14:17 -0500, Don Zickus wrote:

> +int __register_nmi_handler(unsigned int type, unsigned int nmiflags,
> + struct nmiaction *na)
> {
> + if (!na->handler)
> return -EINVAL;
>
> + na->flags = nmiflags;
>
> + return __setup_nmi(type, na);
> }
> +EXPORT_SYMBOL_GPL(__register_nmi_handler);

Put the na->flags thing in the CPP bit, put the !handler check in
__setup_nmi() and loose the pointless wrappery?

> void unregister_nmi_handler(unsigned int type, const char *name)
> {
> + __free_nmi(type, name);
> }
>
> EXPORT_SYMBOL_GPL(unregister_nmi_handler);

That's another quite pointless wrapper there..
--
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/