On Tue, 2026-07-07 at 11:13 -0700, Ryan Lee via AppArmor wrote:

Acked-by: Georgia Garcia <[email protected]>

> Signed-off-by: Ryan Lee <[email protected]>
> ---
>  security/apparmor/lsm.c | 14 +++++++-------
>  1 file changed, 7 insertions(+), 7 deletions(-)
> 
> diff --git a/security/apparmor/lsm.c b/security/apparmor/lsm.c
> index 3c2fc6daa75f..3168063e8eda 100644
> --- a/security/apparmor/lsm.c
> +++ b/security/apparmor/lsm.c
> @@ -1021,23 +1021,23 @@ static int apparmor_task_kill(struct task_struct 
> *target, struct kernel_siginfo
>       const struct cred *tc;
>       struct aa_label *cl, *tl;
>       int error;
> -     bool needput;
> +     bool needput_cl, needput_tl;
>  
>       tc = get_task_cred(target);
> -     tl = aa_get_newest_cred_label(tc);
> +     tl = aa_get_newest_cred_label_condref(tc, &needput_tl);
>       if (cred) {
>               /*
>                * Dealing with USB IO specific behavior
>                */
> -             cl = aa_get_newest_cred_label_condref(cred, &needput);
> +             cl = aa_get_newest_cred_label_condref(cred, &needput_cl);
>               error = aa_may_signal(cred, cl, tc, tl, sig);
> -             aa_put_label_condref(cl, needput);
> +             aa_put_label_condref(cl, needput_cl);
>       } else {
> -             cl = __begin_current_label_crit_section(&needput);
> +             cl = __begin_current_label_crit_section(&needput_cl);
>               error = aa_may_signal(current_cred(), cl, tc, tl, sig);
> -             __end_current_label_crit_section(cl, needput);
> +             __end_current_label_crit_section(cl, needput_cl);
>       }
> -     aa_put_label(tl);
> +     aa_put_label_condref(tl, needput_tl);
>       put_cred(tc);
>  
>       return error;


Reply via email to