kernel: core_hook: Fix and complete try_umount renaming and usage (#165)
Fixed function definition and restored missing ksu_try_umount calls that were unintentionally removed in previous commits. This includes unmounts for: - /debug_ramdisk - /sbin - /system/etc/hosts - /apex/com.android.art/bin/dex2oat64 - /apex/com.android.art/bin/dex2oat32 Fixes:b443b11df9("kernel: Refactoring the mount point unloading logic") Fixes:da7632470d("kernel: 使用 try_umount 替换 ksu_try_umount 以统一卸载逻辑") Signed-off-by: schqiushui <orochi9999@gmail.com>
This commit is contained in:
@@ -1074,7 +1074,7 @@ static void ksu_sys_umount(const char *mnt, int flags)
|
|||||||
#ifdef CONFIG_KSU_SUSFS_TRY_UMOUNT
|
#ifdef CONFIG_KSU_SUSFS_TRY_UMOUNT
|
||||||
void ksu_try_umount(const char *mnt, bool check_mnt, int flags, uid_t uid)
|
void ksu_try_umount(const char *mnt, bool check_mnt, int flags, uid_t uid)
|
||||||
#else
|
#else
|
||||||
static void ksu_try_umount(const char *mnt, bool check_mnt, int flags)
|
static void try_umount(const char *mnt, bool check_mnt, int flags)
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
struct path path;
|
struct path path;
|
||||||
@@ -1123,6 +1123,14 @@ void susfs_try_umount_all(uid_t uid) {
|
|||||||
ksu_try_umount("/data/adb/kpm", false, MNT_DETACH, uid);
|
ksu_try_umount("/data/adb/kpm", false, MNT_DETACH, uid);
|
||||||
/* For both Legacy KSU and Magic Mount KSU */
|
/* For both Legacy KSU and Magic Mount KSU */
|
||||||
ksu_try_umount("/debug_ramdisk", true, MNT_DETACH, uid);
|
ksu_try_umount("/debug_ramdisk", true, MNT_DETACH, uid);
|
||||||
|
ksu_try_umount("/sbin", false, MNT_DETACH, uid);
|
||||||
|
|
||||||
|
// try umount hosts file
|
||||||
|
ksu_try_umount("/system/etc/hosts", false, MNT_DETACH, uid);
|
||||||
|
|
||||||
|
// try umount lsposed dex2oat bins
|
||||||
|
ksu_try_umount("/apex/com.android.art/bin/dex2oat64", false, MNT_DETACH, uid);
|
||||||
|
ksu_try_umount("/apex/com.android.art/bin/dex2oat32", false, MNT_DETACH, uid);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user