From: John Johansen <john.johansen@canonical.com>
To: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
Cc: paul@paul-moore.com, jmorris@namei.org, serge@hallyn.com,
apparmor@lists.ubuntu.com, linux-security-module@vger.kernel.org,
linux-kernel@vger.kernel.org,
Abaci Robot <abaci@linux.alibaba.com>
Subject: Re: [PATCH -next] apparmor: Remove the unused variable rules
Date: Wed, 30 Jul 2025 02:55:16 -0700 [thread overview]
Message-ID: <9a47968a-ea50-43e3-bd4f-7717bbd593cc@canonical.com> (raw)
In-Reply-To: <20250725095252.2087274-1-jiapeng.chong@linux.alibaba.com>
On 7/25/25 02:52, Jiapeng Chong wrote:
> Variable rules is not effectively used, so delete it.
>
> security/apparmor/lsm.c:182:23: warning: variable ‘rules’ set but not used.
>
> Reported-by: Abaci Robot <abaci@linux.alibaba.com>
> Closes: https://bugzilla.openanolis.cn/show_bug.cgi?id=22942
> Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
Acked-by: John Johansen <john.johansen@canonical.com>
I have pulled this in
> ---
> security/apparmor/lsm.c | 2 --
> 1 file changed, 2 deletions(-)
>
> diff --git a/security/apparmor/lsm.c b/security/apparmor/lsm.c
> index 5b1b5ac831e8..182a0e55802e 100644
> --- a/security/apparmor/lsm.c
> +++ b/security/apparmor/lsm.c
> @@ -179,10 +179,8 @@ static int apparmor_capget(const struct task_struct *target, kernel_cap_t *effec
> struct label_it i;
>
> label_for_each_confined(i, label, profile) {
> - struct aa_ruleset *rules;
> kernel_cap_t allowed;
>
> - rules = profile->label.rules[0];
> allowed = aa_profile_capget(profile);
> *effective = cap_intersect(*effective, allowed);
> *permitted = cap_intersect(*permitted, allowed);
prev parent reply other threads:[~2025-07-30 10:05 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-25 9:52 Jiapeng Chong
2025-07-30 9:55 ` John Johansen [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=9a47968a-ea50-43e3-bd4f-7717bbd593cc@canonical.com \
--to=john.johansen@canonical.com \
--cc=abaci@linux.alibaba.com \
--cc=apparmor@lists.ubuntu.com \
--cc=jiapeng.chong@linux.alibaba.com \
--cc=jmorris@namei.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-security-module@vger.kernel.org \
--cc=paul@paul-moore.com \
--cc=serge@hallyn.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®