soc: qcom: mem-hooks: remove module_exit to make the module permanent

Restricted vendor hook can not be unregistered. In this case, the risk
disclosed when doing rmmod. Fix it by making the module permanent.

Change-Id: Ie252a3461050e87ce958f9c9997a10e88b67ec15
Signed-off-by: Zhenhua Huang <quic_zhenhuah@quicinc.com>
This commit is contained in:
Zhenhua Huang
2022-11-14 18:19:12 +08:00
parent 94d692b043
commit 43b9a1a2a7

View File

@@ -166,16 +166,7 @@ static int __init init_mem_hooks(void)
return 0; return 0;
} }
void exit_mem_hooks(void)
{
unregister_trace_android_vh_oom_check_panic(
__oom_panic_defer, NULL);
unregister_trace_android_vh_madvise_cold_or_pageout(
allow_shared_pages_reclaim, NULL);
}
module_init(init_mem_hooks); module_init(init_mem_hooks);
module_exit(exit_mem_hooks);
MODULE_DESCRIPTION("Qualcomm Technologies, Inc. Memory Trace Hook Call-Back Registration"); MODULE_DESCRIPTION("Qualcomm Technologies, Inc. Memory Trace Hook Call-Back Registration");
MODULE_LICENSE("GPL v2"); MODULE_LICENSE("GPL v2");