[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <87k2b2kpdt.fsf@rustcorp.com.au>
Date: Thu, 15 Dec 2016 10:57:42 +1030
From: Rusty Russell <rusty@...tcorp.com.au>
To: "Luis R. Rodriguez" <mcgrof@...nel.org>, shuah@...nel.org,
jeyu@...hat.com, ebiederm@...ssion.com, dmitry.torokhov@...il.com,
acme@...hat.com, corbet@....net
Cc: martin.wilck@...e.com, mmarek@...e.com, pmladek@...e.com,
hare@...e.com, rwright@....com, jeffm@...e.com, DSterba@...e.com,
fdmanana@...e.com, neilb@...e.com, linux@...ck-us.net,
rgoldwyn@...e.com, subashab@...eaurora.org, xypron.glpk@....de,
keescook@...omium.org, atomlin@...hat.com, mbenes@...e.cz,
paulmck@...ux.vnet.ibm.com, dan.j.williams@...el.com,
jpoimboe@...hat.com, davem@...emloft.net, mingo@...hat.com,
akpm@...ux-foundation.org, torvalds@...ux-foundation.org,
linux-kselftest@...r.kernel.org, linux-doc@...r.kernel.org,
linux-kernel@...r.kernel.org,
"Luis R. Rodriguez" <mcgrof@...nel.org>
Subject: Re: [RFC 10/10] kmod: add a sanity check on module loading
"Luis R. Rodriguez" <mcgrof@...nel.org> writes:
> kmod has an optimization in place whereby if a some kernel code
> uses request_module() on a module already loaded we never bother
> userspace as the module already is loaded. This is not true for
> get_fs_type() though as it uses aliases.
Well, the obvious thing to do here is block kmod if we're currently
loading the same module. Otherwise it has to do some weird spinning
thing in userspace anyway.
We already have module_wq for this, we just need a bit more code to
share the return value; and there's a weird corner case there where we
have "modprobe foo param=invalid" then "modprobe foo param=valid" and we
fail both with -EINVAL, but it's probably not worth fixing.
Cheers,
Rusty.
Powered by blists - more mailing lists