Commit 4dc2ce0e authored by Chris Wilson's avatar Chris Wilson

lib/kmod: Fail if the module is already loaded

If we want to set new module options, we must load the module or die
trying. We may want to always fail if the module if already loaded, but
for now, take the small incremental step and insist that the options are
set if requested.
Signed-off-by: Chris Wilson's avatarChris Wilson <>
parent e8905e75
......@@ -141,7 +141,13 @@ out:
static int modprobe(struct kmod_module *kmod, const char *options)
return kmod_module_probe_insert_module(kmod, 0, options,
unsigned int flags;
flags = 0;
if (options) /* force a fresh load to set the new options */
return kmod_module_probe_insert_module(kmod, flags, options,
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment