Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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>

-5
-5
security/apparmor/lsm.c
··· 2174 2174 cache_hold_inc(&cache->hold); 2175 2175 put_cpu_ptr(&aa_local_buffers); 2176 2176 spin_lock(&aa_buffers_lock); 2177 - } else { 2178 - cache = get_cpu_ptr(&aa_local_buffers); 2179 - put_cpu_ptr(&aa_local_buffers); 2180 2177 } 2181 2178 retry: 2182 2179 if (buffer_count > reserve_count || ··· 2228 2231 list_add(&aa_buf->list, &aa_global_buffers); 2229 2232 buffer_count++; 2230 2233 spin_unlock(&aa_buffers_lock); 2231 - cache = get_cpu_ptr(&aa_local_buffers); 2232 - put_cpu_ptr(&aa_local_buffers); 2233 2234 return; 2234 2235 } 2235 2236 /* contention on global list, fallback to percpu */