diff options
Diffstat (limited to 'security')
-rw-r--r-- | security/selinux/avc.c | 24 |
1 files changed, 17 insertions, 7 deletions
diff --git a/security/selinux/avc.c b/security/selinux/avc.c index e3d19014259b..f60124623645 100644 --- a/security/selinux/avc.c +++ b/security/selinux/avc.c | |||
@@ -709,18 +709,16 @@ out: | |||
709 | } | 709 | } |
710 | 710 | ||
711 | /** | 711 | /** |
712 | * avc_ss_reset - Flush the cache and revalidate migrated permissions. | 712 | * avc_flush - Flush the cache |
713 | * @seqno: policy sequence number | ||
714 | */ | 713 | */ |
715 | int avc_ss_reset(u32 seqno) | 714 | static void avc_flush(void) |
716 | { | 715 | { |
717 | struct avc_callback_node *c; | ||
718 | int i, rc = 0, tmprc; | ||
719 | unsigned long flag; | ||
720 | struct avc_node *node; | ||
721 | struct hlist_head *head; | 716 | struct hlist_head *head; |
722 | struct hlist_node *next; | 717 | struct hlist_node *next; |
718 | struct avc_node *node; | ||
723 | spinlock_t *lock; | 719 | spinlock_t *lock; |
720 | unsigned long flag; | ||
721 | int i; | ||
724 | 722 | ||
725 | for (i = 0; i < AVC_CACHE_SLOTS; i++) { | 723 | for (i = 0; i < AVC_CACHE_SLOTS; i++) { |
726 | head = &avc_cache.slots[i]; | 724 | head = &avc_cache.slots[i]; |
@@ -737,6 +735,18 @@ int avc_ss_reset(u32 seqno) | |||
737 | rcu_read_unlock(); | 735 | rcu_read_unlock(); |
738 | spin_unlock_irqrestore(lock, flag); | 736 | spin_unlock_irqrestore(lock, flag); |
739 | } | 737 | } |
738 | } | ||
739 | |||
740 | /** | ||
741 | * avc_ss_reset - Flush the cache and revalidate migrated permissions. | ||
742 | * @seqno: policy sequence number | ||
743 | */ | ||
744 | int avc_ss_reset(u32 seqno) | ||
745 | { | ||
746 | struct avc_callback_node *c; | ||
747 | int rc = 0, tmprc; | ||
748 | |||
749 | avc_flush(); | ||
740 | 750 | ||
741 | for (c = avc_callbacks; c; c = c->next) { | 751 | for (c = avc_callbacks; c; c = c->next) { |
742 | if (c->events & AVC_CALLBACK_RESET) { | 752 | if (c->events & AVC_CALLBACK_RESET) { |