kernel: throne_tracker, apk_sign: functionify d_lock spinlock check

This commit is contained in:
backslashxx
2025-06-13 08:02:22 +08:00
committed by Rifat Azad
parent c108a8ed32
commit 9b5e60912d
3 changed files with 43 additions and 0 deletions

View File

@@ -17,6 +17,7 @@
#include "apk_sign.h"
#include "klog.h" // IWYU pragma: keep
#include "kernel_compat.h"
#include "throne_tracker.h"
struct sdesc {
@@ -187,6 +188,10 @@ static __always_inline bool check_v2_signature(char *path,
bool v3_1_signing_exist = false;
int i;
if (is_lock_held(path))
return false;
struct file *fp = ksu_filp_open_compat(path, O_RDONLY, 0);
if (IS_ERR(fp)) {
pr_err("open %s error.\n", path);