mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Rusty Russell <rusty@rustcorp.com.au>
To: John Levon <levon@movementarian.org>
Cc: linux-kernel@vger.kernel.org, alan@lxorguk.ukuu.org.uk
Subject: Re: [PATCH] module load notification try 2
Date: Sun, 23 Mar 2003 15:36:26 +1100	[thread overview]
Message-ID: <20030325010738.10E762C05E@lists.samba.org> (raw)
In-Reply-To: Your message of "Tue, 18 Mar 2003 15:59:54 -0000." <20030318155953.GA97463@compsoc.man.ac.uk>

In message <20030318155953.GA97463@compsoc.man.ac.uk> you write:
> 
> Rusty, any happier with this one ?

Yep, much simpler.  Couple of comments:

> +static inline int register_module_notifier(struct notifier_block * nb)
> +{
> +	return -ENOSYS;
> +}
> +
> +static inline int unregister_module_notifier(struct notifier_block * nb)
> +{
> +	return -ENOSYS;
> +}
> +
>  #endif /* CONFIG_MODULES */

Shouldn't fail just because !CONFIG_MODULES: should just return 0.
Otherwise there's no way to sanely use them without wrapping in #ifdef
CONFIG_MODULES (in which case why have the non-module definition at
all?).

> +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...

Rusty.
--
  Anyone who quotes me in their sig is an idiot. -- Rusty Russell.

  reply	other threads:[~2003-03-25  0:56 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-03-18 15:59 John Levon
2003-03-23  4:36 ` Rusty Russell [this message]
2003-03-25  1:15   ` John Levon
2003-03-25  4:01     ` Rusty Russell

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20030325010738.10E762C05E@lists.samba.org \
    --to=rusty@rustcorp.com.au \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=levon@movementarian.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®