From mboxrd@z Thu Jan 1 00:00:00 1970 From: Per Svennerbrandt Date: Wed, 18 May 2005 23:37:18 +0000 Subject: Re: [PATCH][RFC] request_modalias: MODALIAS based module loading Message-Id: <20050518233718.GD3011@tsiryulnik> List-Id: References: <20050518230120.GC3011@tsiryulnik> In-Reply-To: <20050518230120.GC3011@tsiryulnik> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: linux-hotplug@vger.kernel.org Ah, one more thing. > +#ifdef CONFIG_REQUEST_MODALIAS > +/** > + * request_modalias - try to load any modules specified > + * by MODALIAS in the enviroment > + * @envp: pointer to an enviroment possibly containing a MODALIAS > + */ > +static void request_modalias(char **envp) > +{ > + int i, len = strlen("MODALIAS="); > + > + if (envp = NULL) return; > + > + for (i = 0; envp[i]; i++) > + if (!strncmp(envp[i], "MODALIAS=", len)) > + __request_module(envp[i] + len, 0); > +} > + > +#else > +static void request_modalias(char **envp) { } > +#endif /* CONFIG_REQUEST_MODALIAS */ So, why didn't I simply call the non __-ish request_module in there (as i originally intended)? Well, as it turns out, most subsystem regularly call kobj->hotplug() with all kinds of locks held and thus modprobe needs to be called asynchronously; something which wasn't possible with the old version. /Per S (An alternative explanation could be that *that* just would've made the path simply *too* non-intrusive and that it thus was forbidden by the mighty kernel deamons... ;) ------------------------------------------------------- This SF.Net email is sponsored by Oracle Space Sweepstakes Want to be the first software developer in space? Enter now for the Oracle Space Sweepstakes! http://ads.osdn.com/?ad_idt12&alloc_id344&op=click _______________________________________________ Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net Linux-hotplug-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel