mirror of https://github.com/dynup/kpatch
kmod/core: print module load/unload messages
Print the loading/unloading messages after they have successfully completed. Using the KERN_NOTICE log level which corresponds to a "normal but significant condition."
This commit is contained in:
parent
e7dde72ed9
commit
b81e2d607b
|
@ -200,7 +200,6 @@ int kpatch_register(struct module *mod, void *kpatch_patches,
|
|||
struct kpatch_patch *patches;
|
||||
struct kpatch_func *funcs, *f;
|
||||
|
||||
pr_err("loading patch module \"%s\"\n", mod->name);
|
||||
|
||||
num_patches = (kpatch_patches_end - kpatch_patches) / sizeof(*patches);
|
||||
patches = kpatch_patches;
|
||||
|
@ -262,6 +261,8 @@ int kpatch_register(struct module *mod, void *kpatch_patches,
|
|||
goto out;
|
||||
}
|
||||
|
||||
pr_notice("loaded patch module \"%s\"\n", mod->name);
|
||||
|
||||
out:
|
||||
if (funcs)
|
||||
kfree(funcs);
|
||||
|
@ -343,6 +344,8 @@ int kpatch_unregister(struct module *mod)
|
|||
}
|
||||
}
|
||||
|
||||
pr_notice("unloaded patch module \"%s\"\n", mod->name);
|
||||
|
||||
out:
|
||||
if (funcs)
|
||||
kfree(funcs);
|
||||
|
|
|
@ -27,14 +27,12 @@ extern char __kpatch_patches, __kpatch_patches_end;
|
|||
|
||||
static int __init patch_init(void)
|
||||
{
|
||||
printk("patch loading\n");
|
||||
return kpatch_register(THIS_MODULE, &__kpatch_patches,
|
||||
&__kpatch_patches_end);
|
||||
}
|
||||
|
||||
static void __exit patch_exit(void)
|
||||
{
|
||||
printk("patch unloading\n");
|
||||
kpatch_unregister(THIS_MODULE);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue