kmod/core: fix kpatch_put_modules call order

kpatch_put_modules() should be called _after_ removing the ftrace
filters.
This commit is contained in:
Josh Poimboeuf 2014-06-13 11:53:27 -05:00
parent 3ca8106987
commit 31bd3a1538

View File

@ -765,8 +765,8 @@ err_unregister:
}
kpatch_num_registered--;
err_rollback:
kpatch_put_modules(funcs, num_funcs);
kpatch_remove_funcs_from_filter(funcs, num_funcs);
kpatch_put_modules(funcs, num_funcs);
err_put:
module_put(kpmod->mod);
err_up:
@ -825,8 +825,8 @@ int kpatch_unregister(struct kpatch_module *kpmod)
}
}
kpatch_put_modules(funcs, num_funcs);
kpatch_remove_funcs_from_filter(funcs, num_funcs);
kpatch_put_modules(funcs, num_funcs);
kfree(kpmod->internal->funcs);
kfree(kpmod->internal);