[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1162210434.2948.13.camel@laptopd505.fenrus.org>
Date: Mon, 30 Oct 2006 13:13:54 +0100
From: Arjan van de Ven <arjan@...radead.org>
To: Peter Pearse <peter.pearse@....com>
Cc: linux-kernel@...r.kernel.org
Subject: Re: [RFC 4/7][PATCH] AMBA DMA: Add a driver module for the DMA
controller.
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
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists