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 [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[Index of Archives]
[Kernel Newbies]
[Netfilter]
[Bugtraq]
[Photo]
[Stuff]
[Gimp]
[Yosemite News]
[MIPS Linux]
[ARM Linux]
[Linux Security]
[Linux RAID]
[Video 4 Linux]
[Linux for the blind]
[Linux Resources]