From: Rusty Russell <rusty@rustcorp.com.au>
To: Petr Vandrovec <vandrove@vc.cvut.cz>
Cc: Matt Reppert <arashi@arashi.yi.org>, linux-kernel@vger.kernel.org
Subject: Re: Fwd: [PATCH] Unsafe MODULE_ usage in crc32.c
Date: Mon, 02 Dec 2002 12:56:43 +1100 [thread overview]
Message-ID: <20021202015750.CA9C72C0CA@lists.samba.org> (raw)
In-Reply-To: Your message of "Sun, 01 Dec 2002 01:27:17 BST." <20021201002717.GB2869@ppc.vc.cvut.cz>
In message <20021201002717.GB2869@ppc.vc.cvut.cz> you write:
> Sorry, I forgot 'm' in your email address. BTW, I thought that this is
> fixed in 2.5.50, isn't?
> Petr
Since SMP was introduced in the kernel, MOD_INC_USE_COUNT; has never
been reliable, and since preempt was introduced, it doesn't work on UP
either[1].
It's the caller's responsibility to grab a reference. And that's OK,
because this is done automatically for you when a module is loaded
which references one of your symbols (it's the handing out of function
pointers that you have to be careful with).
In summary, the correct solution is (and always was) to delete the
MOD_INC_USE_COUNT; and MOD_DEC_USE_COUNT; in crc32.c
Looks like someone was thinking too hard 8)
Hope this helps?
Rusty.
[1] Well, theoretically it could work if you were not preemptible, but
since you can't be removed while not preemptible, there's usually no
reason to bump your own refcount anyway.
--
Anyone who quotes me in their sig is an idiot. -- Rusty Russell.
parent reply other threads:[~2002-12-02 1:50 UTC|newest]
Thread overview: expand[flat|nested] mbox.gz Atom feed
[parent not found: <20021201002717.GB2869@ppc.vc.cvut.cz>]
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=20021202015750.CA9C72C0CA@lists.samba.org \
--to=rusty@rustcorp.com.au \
--cc=arashi@arashi.yi.org \
--cc=linux-kernel@vger.kernel.org \
--cc=vandrove@vc.cvut.cz \
/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®