The profile argument is not used by this function, so don't pass it in.

Signed-off-by: Ryan Lee <ryan....@canonical.com>
---
 security/apparmor/file.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/security/apparmor/file.c b/security/apparmor/file.c
index 6acf0f029604..a59ba26e54d6 100644
--- a/security/apparmor/file.c
+++ b/security/apparmor/file.c
@@ -134,8 +134,7 @@ static int check_cache(struct aa_profile *profile,
 // error - immediate return
 //       - debug message do audit
 // caching is handled on listener task side
-static int check_user(struct aa_profile *profile,
-                     struct apparmor_audit_data *ad,
+static int check_user(struct apparmor_audit_data *ad,
                      struct aa_perms *perms)
 {
        struct aa_audit_node *node = NULL;
@@ -243,7 +242,7 @@ int aa_audit_file(const struct cred *subj_cred,
                 */
                if (prompt && !(request & perms->deny) &&
                    (perms->prompt & implicit_deny) == implicit_deny) {
-                       err = check_user(profile, &ad, perms);
+                       err = check_user(&ad, perms);
                        if (err == -ERESTARTSYS) {
                                AA_DEBUG(DEBUG_UPCALL, "    check user returned 
-ERESTART_SYS");
                                /* are there other errors we should bail on */
-- 
2.43.0
Please let me know if check_user is meant to use the profile argument in the 
future.

base-kernel: Ubuntu-hwe-6.11-6.11.0-17.17_24.04.2
target: Ubuntu-kernel

Reply via email to