mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Jan Beulich" <JBeulich@novell.com>
To: "Patrick McHardy" <kaber@trash.net>
Cc: <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] rmmod notifier chain
Date: Thu, 08 Sep 2005 17:16:47 +0200	[thread overview]
Message-ID: <432071FF0200007800024479@emea1-mh.id2.novell.com> (raw)
In-Reply-To: <43205486.6090901@trash.net>

>> Debugging and maintenance support code occasionally needs to know
not
>> only of module insertions, but also modulke removals. This adds a
>> notifier
>> chain for this purpose.
>> 
>>
>> diff -Npru 2.6.13/kernel/module.c
>> 2.6.13-rmmod-notifier/kernel/module.c
>> --- 2.6.13/kernel/module.c	2005-08-29 01:41:01.000000000 +0200
>> +++ 2.6.13-rmmod-notifier/kernel/module.c	2005-09-02
>> 09:46:24.000000000 +0200
>> @@ -62,6 +62,8 @@ static LIST_HEAD(modules);
>>  
>>  static DECLARE_MUTEX(notify_mutex);
>>  static struct notifier_block * module_notify_list;
>> +static DECLARE_MUTEX(rmmod_notify_mutex);
>
>Why is this mutex needed? The notifier functions already take care of
>locking.

As you can see in the fragment, the same is being done for the insert
notifier chain, and I simply copied and modified that code to have the
lowest possible risk. If that's inappropriate, then the insert notifier
should probably be fixed first...

Jan

  reply	other threads:[~2005-09-08 15:15 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-09-08 15:03 Jan Beulich
2005-09-08 15:11 ` Patrick McHardy
2005-09-08 15:16   ` Jan Beulich [this message]
2005-09-08 15:16 ` Christoph Hellwig
2005-09-08 15:20   ` viro
2005-09-08 15:22   ` Jan Beulich
2005-09-09  1:46     ` Andrew Morton
2005-09-09 12:44       ` Jan Beulich
2005-09-09 13:44         ` Jesper Juhl
2005-09-09 15:37         ` Paul Jackson
2005-09-09 18:27         ` Andrew Morton
2005-09-12  6:49           ` Jan Beulich
2005-09-12  7:10             ` Andrew Morton
2005-09-08 15:33 ` Tom Rini
2005-09-08 15:48   ` Jan Beulich
2005-09-09  9:42   ` [PATCH] rmmod notifier chain (attempt 2) Jan Beulich

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=432071FF0200007800024479@emea1-mh.id2.novell.com \
    --to=jbeulich@novell.com \
    --cc=kaber@trash.net \
    --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®