From: rmingming <mingming.nk@gmail.com>
To: linux-kernel@vger.kernel.org
Subject: Re: Is try_module_get buggy?
Date: Wed, 23 Jan 2008 22:34:57 +0800 [thread overview]
Message-ID: <4cc25cb20801230634w2cab51c7w8d62d75ec982f132@mail.gmail.com> (raw)
In-Reply-To: <200801171409.39389.rusty@rustcorp.com.au>
> Hi rminming,
>
> try_module_get is designed to ensure that you don't call a function inside a
> module without a reference. Like any reference function, it cannot handle
> the case where the argument is invalid (or invalidated partway through the
> call).
>
> In this case, the module pointer is usually inside a registered structure.
> The pointer will be valid until the structure is unregistered, which the
> calling code presumably prevents while it's doing a lookup.
>
> Hope that clarifies,
> Rusty.
>
Hi Rusty,
Thank you so much!
I think you mean that this situation can really happen, because this
is a reference function, but it is so seldom, and the common result of
this situation is a kernel oops, it's not very important. Am I right?
Sorry about later reply, thanks again.
Best wishes,
rmingming
prev parent reply other threads:[~2008-01-23 14:35 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-01-12 4:35 rmingming
2008-01-17 3:09 ` Rusty Russell
2008-01-23 14:34 ` rmingming [this message]
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=4cc25cb20801230634w2cab51c7w8d62d75ec982f132@mail.gmail.com \
--to=mingming.nk@gmail.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
all inboxes | Powered by JetHome®