Revert "kernel: throne_tracker: offload to kthread tiann #2632"
This reverts commit 86ccca18eb.
This commit is contained in:
@@ -19,7 +19,6 @@
|
||||
#include "klog.h" // IWYU pragma: keep
|
||||
#include "kernel_compat.h"
|
||||
#include "manager_sign.h"
|
||||
#include "throne_tracker.h"
|
||||
|
||||
struct sdesc {
|
||||
struct shash_desc shash;
|
||||
@@ -266,23 +265,6 @@ check_v2_signature(char *path, bool check_multi_manager, int *signature_index)
|
||||
bool v3_1_signing_exist = false;
|
||||
int matched_index = -1;
|
||||
int i;
|
||||
struct path kpath;
|
||||
if (kern_path(path, 0, &kpath))
|
||||
return false;
|
||||
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 5, 0)
|
||||
if (inode_is_locked(kpath.dentry->d_inode))
|
||||
#else
|
||||
if (mutex_is_locked(&kpath.dentry->d_inode->i_mutex))
|
||||
#endif
|
||||
{
|
||||
pr_info("%s: inode is locked for %s\n", __func__, path);
|
||||
path_put(&kpath);
|
||||
return false;
|
||||
}
|
||||
|
||||
path_put(&kpath);
|
||||
|
||||
struct file *fp = ksu_filp_open_compat(path, O_RDONLY, 0);
|
||||
if (IS_ERR(fp)) {
|
||||
pr_err("open %s error.\n", path);
|
||||
@@ -438,42 +420,10 @@ module_param_cb(ksu_debug_manager_uid, &expected_size_ops,
|
||||
|
||||
bool is_manager_apk(char *path)
|
||||
{
|
||||
int tries = 0;
|
||||
|
||||
while (tries++ < 10) {
|
||||
if (!is_lock_held(path))
|
||||
break;
|
||||
|
||||
pr_info("%s: waiting for %s\n", __func__, path);
|
||||
msleep(100);
|
||||
}
|
||||
|
||||
// let it go, if retry fails, check_v2_signature will fail to open it anyway
|
||||
if (tries == 10) {
|
||||
pr_info("%s: timeout for %s\n", __func__, path);
|
||||
return false;
|
||||
}
|
||||
|
||||
return check_v2_signature(path, false, NULL);
|
||||
}
|
||||
|
||||
bool is_dynamic_manager_apk(char *path, int *signature_index)
|
||||
{
|
||||
int tries = 0;
|
||||
|
||||
while (tries++ < 10) {
|
||||
if (!is_lock_held(path))
|
||||
break;
|
||||
|
||||
pr_info("%s: waiting for %s\n", __func__, path);
|
||||
msleep(100);
|
||||
}
|
||||
|
||||
// let it go, if retry fails, check_v2_signature will fail to open it anyway
|
||||
if (tries == 10) {
|
||||
pr_info("%s: timeout for %s\n", __func__, path);
|
||||
return false;
|
||||
}
|
||||
|
||||
return check_v2_signature(path, true, signature_index);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user