From: Anders Fugmann <afu@fugmann.dhs.org>
To: Bart De Schuymer <bdschuym@pandora.be>
Cc: netfilter-devel@lists.netfilter.org, laforge@gnumonks.org
Subject: Re: remove usage of __MOD_XXX_USAGE_COUNT and derivatives
Date: Sat, 11 Jan 2003 19:36:58 +0100 [thread overview]
Message-ID: <3E20644A.9020001@fugmann.dhs.org> (raw)
In-Reply-To: <200301111713.25263.bdschuym@pandora.be>
Bart De Schuymer wrote:
> On Friday 10 January 2003 14:49, Anders Fugmann wrote:
>
>>One thing I have noticed is that the module usage count for 'ip_tables'
>>gets incremented twice when loading a module that depends on the
>>ip_tables module. Unloading the module again also decrements usage count
>>on ip_tables with 2. This happens both on vanilla 2.5.55 and 2.5.55 with
>>the patch applied. It does not happen on 2.4.20 though.
>
>
> It seems the generic module code already increments the usage count. The
> iptables code also increments it, so that results in +2.
Yes. I think that this will be cured by removing all MOD_INC_USE_COUNT
(see below).
>
>
>>One question. Why is the module count increased (code wise) whenever a
>>new module is loaded, that depends on the current module? Eg. When
>>loading ipt_MARK, the module count for ip_tables is increased. The
>>dependancies are still kept by the kernel so ip_tables cannot be
>>unloaded anyhow.
>
>
> It's in Rusty's FAQ for his new module scheme:
> http://www.kernel.org/pub/linux/kernel/people/rusty/modules/FAQ
> MOD_INC_USE_COUNT is deprecated and should be removed.
>
> Your patch has some problems:
>
> - MOD_INC_USE_COUNT;
> + try_module_get(THIS_MODULE);
>
> (see above)
Thanks. I will make an update to the patch.
(In which basically all MOD_INC_USE_COUNT and MOD_DEC_USE_COUNTS will be
removed.)
>
>
> - if (match->me)
> - __MOD_INC_USE_COUNT(match->me);
> + try_module_get(match->me);
I will see how this can be done. The probem is not rerutning the error,
but rather handling it correctly (Reporting back to userspace that a
module could not be loaded or is beeing loaded).
Regards
Anders Fugmann
next prev parent reply other threads:[~2003-01-11 18:36 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-01-09 21:52 remove usage of __MOD_XXX_USAGE_COUNT and derivatives Anders Fugmann
2003-01-10 13:13 ` Harald Welte
2003-01-10 13:49 ` Anders Fugmann
2003-01-10 13:49 ` Harald Welte
2003-01-10 15:21 ` Anders Fugmann
2003-01-12 16:36 ` Harald Welte
2003-01-12 22:14 ` Bart De Schuymer
2003-01-13 16:58 ` Anders Fugmann
2003-01-13 22:56 ` Bart De Schuymer
2003-01-13 22:21 ` Anders Fugmann
2003-01-13 23:53 ` Bart De Schuymer
[not found] ` <3E234A92.50606@fugmann.dhs.org>
2003-01-14 1:14 ` Bart De Schuymer
2003-01-11 16:13 ` Bart De Schuymer
2003-01-11 18:36 ` Anders Fugmann [this message]
2003-02-16 19:43 ` Anders Fugmann
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=3E20644A.9020001@fugmann.dhs.org \
--to=afu@fugmann.dhs.org \
--cc=bdschuym@pandora.be \
--cc=laforge@gnumonks.org \
--cc=netfilter-devel@lists.netfilter.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.