Skip to content
Commit f01e1af4 authored by Linus Torvalds's avatar Linus Torvalds
Browse files

selinux: don't pass in NULL avd to avc_has_perm_noaudit



Right now security_get_user_sids() will pass in a NULL avd pointer to
avc_has_perm_noaudit(), which then forces that function to have a dummy
entry for that case and just generally test it.

Don't do it.  The normal callers all pass a real avd pointer, and this
helper function is incredibly hot.  So don't make avc_has_perm_noaudit()
do conditional stuff that isn't needed for the common case.

This also avoids some duplicated stack space.

Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent bc9bc72e
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment