mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Arjan van de Ven <arjan@infradead.org>
To: Peter Pearse <peter.pearse@arm.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [RFC 4/7][PATCH] AMBA DMA: Add a driver module for the DMA controller.
Date: Mon, 30 Oct 2006 13:13:54 +0100	[thread overview]
Message-ID: <1162210434.2948.13.camel@laptopd505.fenrus.org> (raw)
In-Reply-To: <CAM-OWA1NTX9gHWdm4j00000005@cam-owa1.Emea.Arm.com>

On Mon, 2006-10-30 at 12:02 +0000, Peter Pearse wrote:
> }
> +/* 
> + * Export wrapped find_module to allow drivers to find their modules
> + * Useful for e.g. controlling the usage count
> + */ 
> +struct module *try_find_module(const char *name)
> +{
> +       struct module *mod;
> +       mutex_lock(&module_mutex);
> +       mod = find_module(name);
> +       mutex_unlock(&module_mutex);
> +       return mod;
> +}
> +EXPORT_SYMBOL(try_find_module);
> + 

this looks very very wrong to me.
It's racey for one, and for another, module names sound wrong. You want
to be using the symbol it provides instead, and then use __symbol_get()
and friends...

-- 
if you want to mail me at work (you don't), use arjan (at) linux.intel.com
Test the interaction between Linux and your BIOS via http://www.linuxfirmwarekit.org


  reply	other threads:[~2006-10-30 12:13 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-10-30 12:02 Peter Pearse
2006-10-30 12:13 ` Arjan van de Ven [this message]
2006-10-30 17:24   ` Roland Dreier

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=1162210434.2948.13.camel@laptopd505.fenrus.org \
    --to=arjan@infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=peter.pearse@arm.com \
    /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®