-
Notifications
You must be signed in to change notification settings - Fork 0
/
0003-kernel-module.c-Force-loading-of-modules-that-fail-s.patch
42 lines (36 loc) · 1.51 KB
/
0003-kernel-module.c-Force-loading-of-modules-that-fail-s.patch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
From ad532e7421d097a76834f93c0655978c8f4137f2 Mon Sep 17 00:00:00 2001
From: Pzqqt <[email protected]>
Date: Mon, 3 Jul 2023 13:02:46 +0800
Subject: [PATCH 3/7] kernel: module.c: Force loading of modules that fail
symbol version checks
- Some kernel changes may break kmi, at which point the kernel will
refuse to load some vendor modules.
- But certain modules are critical for device startup. If they are
not successfully loaded, not only can't boot, even can't enter
recovery mode (because the same kernel is used to start Android
and start recovery). At this time, user can only flash the stock
boot image through fastboot. This is very inconvenient for users.
- Therefore, we force the loading of modules that fail the symbol
version check to ensure that Android / Recovery can start normally.
But also keep the warning to remind the developer to fix it.
Signed-off-by: Pzqqt <[email protected]>
Signed-off-by: dodyirawan85 <[email protected]>
---
kernel/module.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/kernel/module.c b/kernel/module.c
index fb4e581dc..5b77d9f2e 100644
--- a/kernel/module.c
+++ b/kernel/module.c
@@ -1344,9 +1344,9 @@ static int check_version(const struct load_info *info,
return 1;
bad_version:
- pr_warn("%s: disagrees about version of symbol %s\n",
+ pr_warn("%s: disagrees about version of symbol %s, but ignore...\n",
info->name, symname);
- return 0;
+ return 1;
}
static inline int check_modstruct_version(const struct load_info *info,
--
2.34.1