Re: [PATCH] rmmod notifier chain

From: Patrick McHardy
Date: Thu Sep 08 2005 - 10:11:28 EST


Jan Beulich wrote:
> 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.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/