Messages in this thread | | | Date | Tue, 25 Mar 2003 01:15:25 +0000 | From | John Levon <> | Subject | Re: [PATCH] module load notification try 2 |
| |
On Sun, Mar 23, 2003 at 03:36:26PM +1100, Rusty Russell wrote:
> > +static inline int register_module_notifier(struct notifier_block * nb) > > +{ > > + return -ENOSYS; > > +} > > Shouldn't fail just because !CONFIG_MODULES: should just return 0.
Ho-de-hum, flipped a coin, lost the toss.
> Otherwise there's no way to sanely use them without wrapping in #ifdef
Well, "if (err && err != -ENOSYS)". The relative sanity of that is debatable. I don't care either way, hence the coin toss.
I Cc:ed Zwane who was advocating -ENOSYS on IRC ...
> > +static DECLARE_MUTEX(notify_mutex); > > Hmm, yes, you need to use your own protection around > notifier_chain_register and notifier_call_chain. Wierd, because > notifier.c does its own locking for register and unregister, but not > for calling, which AFAICT makes it useless...
I mentioned about this some time ago on lkml to massive indifference. Later on someone from OSDL reworked all the notifier stuff, dunno what happened to the patch.
regards, john - 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/
| |