Messages in this thread | | | From | Keith Owens <> | Subject | Re: [RFC][PATCH 0/7]: Fix for unsafe notifier chain | Date | Fri, 09 Dec 2005 15:50:46 +1100 |
| |
On Wed, 7 Dec 2005 15:36:12 -0800, Andrew Morton <akpm@osdl.org> wrote: >As for the NMIs and RCU: I suspect it was simply a mistake to try to use >notifier chains for NMI registration in the first place - they are simply >too complex a data structure for this. I think I previously suggested >removing that code and using just a fixed-size array of function pointers.
The notifier chain is a priority ordered list. Registration and unregistration must be able to insert and delete anywhere in the list, which does not fit with a fixed-size array of pointers.
There is also the problem that unregister must not return to its caller if any NMI type callback is running on any cpu. The list and function body are held in caller defined storage and if unregistration returns too soon then the storage could be freed while the callback is still executing.
I do not understand why people think that NMI callbacks are a hard problem to solve. Besides RCU type solutions, there is also a patch based on an idea by Corey Minyard, see http://marc.theaimsgroup.com/?l=linux-kernel&m=113392370322545&w=2.
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |