[apparmor] [PATCH] apparmor: use __label_make_stale in __aa_proxy_redirect

Ryan Lee ryan.lee at canonical.com
Thu Feb 12 21:15:14 UTC 2026


The macro is equivalent to OR-ing in the bitflag manually, but using the
macro consistently makes grepping for these occurrences easier.

Signed-off-by: Ryan Lee <ryan.lee at canonical.com>
---
 security/apparmor/label.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

This patch applies cleanly to both the Ubuntu 6.17 kernel and upstream master.

diff --git a/security/apparmor/label.c b/security/apparmor/label.c
index 14bbed88aa83..ee9836ebc196 100644
--- a/security/apparmor/label.c
+++ b/security/apparmor/label.c
@@ -81,7 +81,7 @@ void __aa_proxy_redirect(struct aa_label *orig, struct aa_label *new)
 	tmp = rcu_dereference_protected(orig->proxy->label,
 					&labels_ns(orig)->lock);
 	rcu_assign_pointer(orig->proxy->label, aa_get_label(new));
-	orig->flags |= FLAG_STALE;
+	__label_make_stale(orig);
 	aa_put_label(tmp);
 }
 
-- 
2.43.0




More information about the AppArmor mailing list