Re: [PATCH] modules, lock around setting of MODULE_STATE_UNFORMED

From: Oleg Nesterov
Date: Wed Oct 08 2014 - 10:40:45 EST


On 10/08, Prarit Bhargava wrote:
>
> --- a/kernel/module.c
> +++ b/kernel/module.c
> @@ -1842,7 +1842,9 @@ static void free_module(struct module *mod)
>
> /* We leave it in list to prevent duplicate loads, but make sure
> * that noone uses it while it's being deconstructed. */
> + mutex_lock(&module_mutex);
> mod->state = MODULE_STATE_UNFORMED;
> + mutex_unlock(&module_mutex);
>
> /* Remove dynamic debug info */
> ddebug_remove_module(mod->name);

Reviewed-by: Oleg Nesterov <oleg@xxxxxxxxxx>

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/