diff options
Diffstat (limited to 'security/selinux/avc.c')
-rw-r--r-- | security/selinux/avc.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/security/selinux/avc.c b/security/selinux/avc.c index 5971e30e8239..3d2715fd35ea 100644 --- a/security/selinux/avc.c +++ b/security/selinux/avc.c | |||
@@ -343,11 +343,10 @@ static struct avc_node *avc_lookup(u32 ssid, u32 tsid, u16 tclass) | |||
343 | node = avc_search_node(ssid, tsid, tclass); | 343 | node = avc_search_node(ssid, tsid, tclass); |
344 | 344 | ||
345 | if (node) | 345 | if (node) |
346 | avc_cache_stats_incr(hits); | 346 | return node; |
347 | else | ||
348 | avc_cache_stats_incr(misses); | ||
349 | 347 | ||
350 | return node; | 348 | avc_cache_stats_incr(misses); |
349 | return NULL; | ||
351 | } | 350 | } |
352 | 351 | ||
353 | static int avc_latest_notif_update(int seqno, int is_insert) | 352 | static int avc_latest_notif_update(int seqno, int is_insert) |
@@ -765,7 +764,7 @@ int avc_has_perm_noaudit(u32 ssid, u32 tsid, | |||
765 | rcu_read_lock(); | 764 | rcu_read_lock(); |
766 | 765 | ||
767 | node = avc_lookup(ssid, tsid, tclass); | 766 | node = avc_lookup(ssid, tsid, tclass); |
768 | if (!node) { | 767 | if (unlikely(!node)) { |
769 | rcu_read_unlock(); | 768 | rcu_read_unlock(); |
770 | 769 | ||
771 | if (in_avd) | 770 | if (in_avd) |