Commit de96d79f authored by Andrey Tsyvarev's avatar Andrey Tsyvarev Committed by Rusty Russell
Browse files

kernel/module.c: Free lock-classes if parse_args failed

parse_args call module parameters' .set handlers, which may use locks defined in the module.
So, these classes should be freed in case parse_args returns error(e.g. due to incorrect parameter passed).

Signed-off-by: default avatarAndrey Tsyvarev <>
Signed-off-by: default avatarRusty Russell <>
parent 5d8591bc
......@@ -3356,6 +3356,9 @@ static int load_module(struct load_info *info, const char __user *uargs,
/* Free lock-classes: */
lockdep_free_key_range(mod->module_core, mod->core_size);
/* we can't deallocate the module until we clear memory protection */
Supports Markdown
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