Commit 87cc7b00 authored by Mateusz Guzik's avatar Mateusz Guzik Committed by John Johansen
Browse files

apparmor: make __begin_current_label_crit_section() indicate whether put is needed



Same as aa_get_newest_cred_label_condref().

This avoids a bunch of work overall and allows the compiler to note when no
clean up is necessary, allowing for tail calls.

This in particular happens in apparmor_file_permission(), which manages to
tail call aa_file_perm() 105 bytes in (vs a regular call 112 bytes in
followed by branches to figure out if clean up is needed).

Signed-off-by: default avatarMateusz Guzik <mjguzik@gmail.com>
Signed-off-by: default avatarJohn Johansen <john.johansen@canonical.com>
parent 37a3741d
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment