Repository navigation
Commit f01e1af
committed
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: Linus Torvalds <torvalds@linux-foundation.org>1 parent bc9bc72 commit f01e1af
2 files changed
Lines changed: 4 additions & 11 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
752 | 752 | | |
753 | 753 | | |
754 | 754 | | |
755 | | - | |
| 755 | + | |
756 | 756 | | |
757 | 757 | | |
758 | | - | |
759 | 758 | | |
760 | 759 | | |
761 | 760 | | |
| |||
766 | 765 | | |
767 | 766 | | |
768 | 767 | | |
769 | | - | |
770 | | - | |
771 | | - | |
772 | | - | |
773 | | - | |
774 | | - | |
775 | 768 | | |
776 | 769 | | |
777 | 770 | | |
778 | 771 | | |
779 | | - | |
780 | | - | |
| 772 | + | |
781 | 773 | | |
782 | 774 | | |
783 | 775 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2217 | 2217 | | |
2218 | 2218 | | |
2219 | 2219 | | |
| 2220 | + | |
2220 | 2221 | | |
2221 | 2222 | | |
2222 | 2223 | | |
2223 | | - | |
| 2224 | + | |
2224 | 2225 | | |
2225 | 2226 | | |
2226 | 2227 | | |
| |||
0 commit comments