From: Ivan Kokshaysky <ink@jurassic.park.msu.ru>
To: Christoph Hellwig <hch@lst.de>,
rth@twiddle.net, linux-kernel@vger.kernel.org
Subject: Re: alpha fp-emu vs module refcounting
Date: Sat, 8 May 2004 02:37:17 +0400 [thread overview]
Message-ID: <20040508023717.A3960@jurassic.park.msu.ru> (raw)
In-Reply-To: <20040507143512.GA14338@lst.de>; from hch@lst.de on Fri, May 07, 2004 at 04:35:12PM +0200
On Fri, May 07, 2004 at 04:35:12PM +0200, Christoph Hellwig wrote:
> On Fri, May 07, 2004 at 06:32:08PM +0400, Ivan Kokshaysky wrote:
> > - MOD_INC_USE_COUNT;
> > + BUG_ON(!try_module_get(THIS_MODULE));
>
> This is broken. If you know you already have a reference somewhere -
> and I can't find how that would work - you'd have to use __module_get,
> but if it's not you can get a failure from try_module_get legally and
> you should do the try_module_get outside the module, before it's code
> is exectuted.
Ok, I realize - this seems to be confusing. I'll try to clarify:
- First of all, mere mortals are _not_ allowed to compile mandatory
alpha IEEE fp emulation code as a module. Which is documented
in arch/alpha/Kconfig.
- Roughly speaking, the fp emu _module_ code intercepts the fp traps,
so races vs module loading/unloading are fundamentally unavoidable.
These refcounting attempts just narrow the window.
And no, try_module_get should never fail here.
Alternatively, we could just drop _all_ module related stuff from
alpha/math-emu...
Ivan.
next prev parent reply other threads:[~2004-05-07 22:37 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-05-07 11:02 Christoph Hellwig
2004-05-07 14:32 ` Ivan Kokshaysky
2004-05-07 14:35 ` Christoph Hellwig
2004-05-07 22:37 ` Ivan Kokshaysky [this message]
2004-05-07 22:41 ` Christoph Hellwig
2004-05-07 22:51 ` Ivan Kokshaysky
2004-05-16 10:04 ` Christoph Hellwig
2004-05-16 12:44 ` Ivan Kokshaysky
2004-05-16 13:09 ` Christoph Hellwig
2004-05-17 22:39 ` Richard Henderson
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=20040508023717.A3960@jurassic.park.msu.ru \
--to=ink@jurassic.park.msu.ru \
--cc=hch@lst.de \
--cc=linux-kernel@vger.kernel.org \
--cc=rth@twiddle.net \
/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®