From: Rusty Russell <rusty@rustcorp.com.au>
To: "David S. Miller" <davem@redhat.com>
Cc: linux-kernel@vger.kernel.org, acme@conectiva.com.br
Subject: Re: [2.5.69-mm1] kernel BUG at include/linux/module.h:284!
Date: Wed, 07 May 2003 13:48:15 +1000 [thread overview]
Message-ID: <20030507035148.31D332C117@lists.samba.org> (raw)
In-Reply-To: Your message of "06 May 2003 06:22:12 MST." <1052227331.983.46.camel@rth.ninka.net>
In message <1052227331.983.46.camel@rth.ninka.net> you write:
> Arnaldo, ipv6 creates a socket of it's own type during
> module init, try_module_get() on the current module fails
> during module load... do you see the problem?
>
> Rusty, you said you were working on a solution for modules
> that call themselves during their own init?
In fact, it's backwards. Currently we *do* allow try_module_get()
during init:
/* FIXME: It'd be nice to isolate modules during init, too, so they
aren't used before they (may) fail. But presently too much code
(IDE & SCSI) require entry into the module during init. */
static inline int module_is_live(struct module *mod)
{
return mod->state != MODULE_STATE_GOING;
}
This probably won't change before 2.6: sure, there are races, but
we've lived with them so far. I don't like it, but that's the
Realpolitik of the Linux Kernel.
There are a few ways of fixing it. Viro suggested every interface be
explicitly split into "reserve and commit". To put it mildly, I shy
away from changing every module for an obscure race which so few
people understand anyway. There's the make_module_live() function,
where a module says "I'm finished init already". Of course, you can't
fail initialization after this. Or, the current module notifier could
be extended, to have an event after module init.
None of these would be one-liners for IPv6, AFAICT.
Hope that clarifies,
Rusty.
--
Anyone who quotes me in their sig is an idiot. -- Rusty Russell.
next prev parent reply other threads:[~2003-05-07 3:39 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-05-06 12:44 [2.5.69-mm1] kernel BUG at include/linux/module.h:284! Kimmo Sundqvist
2003-05-06 13:22 ` David S. Miller
2003-05-07 3:48 ` Rusty Russell [this message]
2003-05-07 5:52 ` David S. Miller
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=20030507035148.31D332C117@lists.samba.org \
--to=rusty@rustcorp.com.au \
--cc=acme@conectiva.com.br \
--cc=davem@redhat.com \
--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;
as well as URLs for NNTP newsgroup(s).