forked from zzh20188/GKI_KernelSU_SUSFS
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcore_hook.c.patch
More file actions
35 lines (32 loc) · 1.15 KB
/
core_hook.c.patch
File metadata and controls
35 lines (32 loc) · 1.15 KB
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
diff --git a/kernel/core_hook.c b/kernel/core_hook.c
index 0f33a2dd..2471c7bb 100644
--- a/kernel/core_hook.c
+++ b/kernel/core_hook.c
@@ -1164,17 +1164,23 @@ out_ksu_try_umount:
current->pid);
#endif
+#ifdef CONFIG_KSU_SUSFS_TRY_UMOUNT
+out_susfs_try_umount_all:
+ // susfs come first, and lastly umount by ksu, make sure umount in reversed order
+ susfs_try_umount_all(new_uid.val);
+#else
// fixme: use `collect_mounts` and `iterate_mount` to iterate all mountpoint and
// filter the mountpoint whose target is `/data/adb`
- try_umount("/odm", true, 0);
- try_umount("/system", true, 0);
- try_umount("/vendor", true, 0);
- try_umount("/product", true, 0);
- try_umount("/system_ext", true, 0);
- try_umount("/data/adb/modules", false, MNT_DETACH);
+ ksu_try_umount("/odm", true, 0);
+ ksu_try_umount("/system", true, 0);
+ ksu_try_umount("/vendor", true, 0);
+ ksu_try_umount("/product", true, 0);
+ ksu_try_umount("/system_ext", true, 0);
+ ksu_try_umount("/data/adb/modules", false, MNT_DETACH);
// try umount ksu temp path
- try_umount("/debug_ramdisk", false, MNT_DETACH);
+ ksu_try_umount("/debug_ramdisk", false, MNT_DETACH);
+#endif
return 0;
}