Well, you also need:
if (mod && !try_module_get(mod))
mod = NULL; /* Not ready, or vanishing. Ignore. */
Just before the "up(&module_mutex);".
I'm not convinced you don't want some other, more powerful interface,
though, like "get_ksymbol_address()" or something.
Rusty.
-- Anyone who quotes me in their sig is an idiot. -- Rusty Russell. - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/