From: John Johansen Date: Wed, 21 Jan 2026 09:09:11 +0000 (-0800) Subject: apparmor: cleanup remove unused percpu critical sections in buffer management X-Git-Tag: v7.0-rc1~35^2~7 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=859b725579718ad1b66a81237df9d786f38679da;p=thirdparty%2Fkernel%2Fstable.git apparmor: cleanup remove unused percpu critical sections in buffer management There are two unused percpu critical sections in the buffer management code. These are remanents from when a more complex hold algorithm was used. Remove them, as they serve no purpose. Reviewed-by: Georgia Garcia Signed-off-by: John Johansen --- diff --git a/security/apparmor/lsm.c b/security/apparmor/lsm.c index 34fc458887d7..dcd066e04d2b 100644 --- a/security/apparmor/lsm.c +++ b/security/apparmor/lsm.c @@ -2174,9 +2174,6 @@ char *aa_get_buffer(bool in_atomic) cache_hold_inc(&cache->hold); put_cpu_ptr(&aa_local_buffers); spin_lock(&aa_buffers_lock); - } else { - cache = get_cpu_ptr(&aa_local_buffers); - put_cpu_ptr(&aa_local_buffers); } retry: if (buffer_count > reserve_count || @@ -2231,8 +2228,6 @@ void aa_put_buffer(char *buf) list_add(&aa_buf->list, &aa_global_buffers); buffer_count++; spin_unlock(&aa_buffers_lock); - cache = get_cpu_ptr(&aa_local_buffers); - put_cpu_ptr(&aa_local_buffers); return; } /* contention on global list, fallback to percpu */