Messages in this thread | | | Date | Wed, 4 Mar 2015 16:45:58 -0600 | From | Josh Poimboeuf <> | Subject | Re: [PATCH 2/2] livepatch: fix patched module loading race |
| |
On Wed, Mar 04, 2015 at 11:02:59PM +0100, Jiri Kosina wrote: > On Wed, 4 Mar 2015, Josh Poimboeuf wrote: > > > Well, we could just get a reference on all patched modules to prevent them > > from being unloaded. > > Is that really a solution for cases where you are unloading a module (it > has "just" been switched to MODULE_STATE_GOING) and enable a patch which > patches one of its functions directly after it got switched to > MODULE_STATE_GOING?
Ah, right. try_module_get() fails, we don't patch the module, and we end up in the same mod->exit() race. Never mind, again :-)
-- Josh
| |