From abefa18605dd7ec20419e8061739357d2a4d67a4 Mon Sep 17 00:00:00 2001
From: liqiang <liqiang64@huawei.com>
Date: Wed, 28 Aug 2024 02:24:59 +0800
Subject: [PATCH] fix kernel patch ACCEPTED change to DEACTIVED after reboot

Signed-off-by: liqiang <liqiang64@huawei.com>
---
 syscared/src/patch/driver/kpatch/sys.rs | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/syscared/src/patch/driver/kpatch/sys.rs b/syscared/src/patch/driver/kpatch/sys.rs
index 22efa93..fd5160c 100644
--- a/syscared/src/patch/driver/kpatch/sys.rs
+++ b/syscared/src/patch/driver/kpatch/sys.rs
@@ -90,7 +90,7 @@ pub fn apply_patch(patch: &KernelPatch) -> Result<()> {
     kmod::finit_module(
         &patch_module,
         CString::new("")?.as_c_str(),
-        kmod::ModuleInitFlags::MODULE_INIT_IGNORE_VERMAGIC,
+        kmod::ModuleInitFlags::empty(),
     )
     .map_err(|e| anyhow!("Kpatch: {}", std::io::Error::from(e)))
 }
-- 
2.34.1

