From 43b9a1a2a751941cdbc8768072cd7a3ba7e0b6ea Mon Sep 17 00:00:00 2001 From: Zhenhua Huang Date: Mon, 14 Nov 2022 18:19:12 +0800 Subject: [PATCH] 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 --- drivers/soc/qcom/mem-hooks.c | 9 --------- 1 file changed, 9 deletions(-) diff --git a/drivers/soc/qcom/mem-hooks.c b/drivers/soc/qcom/mem-hooks.c index 038d0f156f59..75a8564847d7 100644 --- a/drivers/soc/qcom/mem-hooks.c +++ b/drivers/soc/qcom/mem-hooks.c @@ -166,16 +166,7 @@ static int __init init_mem_hooks(void) 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_exit(exit_mem_hooks); MODULE_DESCRIPTION("Qualcomm Technologies, Inc. Memory Trace Hook Call-Back Registration"); MODULE_LICENSE("GPL v2");