Re: [RFC PATCH 1/2] kernel/notifier: replace single-linked list with double-linked list for reverse traversal
Song Chen <[email protected]>
| Newsgroups | gmane.linux.kernel,gmane.linux.kernel.modules,gmane.linux.acpi.devel,gmane.linux.kernel.clk,gmane.linux.power-management.general,gmane.linux.raid,gmane.linux.kernel.debugging.kgdb.bugs,gmane.linux.network |
|---|---|
| Message-ID | <[email protected]> |
Hi, On 4/16/26 20:30, David Laight wrote: > On Wed, 15 Apr 2026 15:01:37 +0800 > [email protected] wrote: > >> From: Song Chen <[email protected]> >> >> The current notifier chain implementation uses a single-linked list >> (struct notifier_block *next), which only supports forward traversal >> in priority order. This makes it difficult to handle cleanup/teardown >> scenarios that require notifiers to be called in reverse priority order. > > If it is only cleanup/teardown then the list can be order-reversed > as part of that process at the same time as the list is deleted. > > David > > > Sorry, i don't follow, the notifiers in the list are deleted when calling notifier_chain_unregister, other than that, they are traversed forward and backward. Song