diff options
| author | John Johansen <john.johansen@canonical.com> | 2026-01-21 01:09:11 -0800 |
|---|---|---|
| committer | John Johansen <john.johansen@canonical.com> | 2026-01-29 01:27:55 -0800 |
| commit | 859b725579718ad1b66a81237df9d786f38679da (patch) | |
| tree | 00eadffe9952077e05bbae598cdf2d94b2ba825c /security | |
| parent | 0b6a6b72b329c34a13a13908d5e8df9fb46eaa1f (diff) | |
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 <georgia.garcia@canonical.com>
Signed-off-by: John Johansen <john.johansen@canonical.com>
Diffstat (limited to 'security')
| -rw-r--r-- | security/apparmor/lsm.c | 5 |
1 files changed, 0 insertions, 5 deletions
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 */ |
