Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 157303
b: refs/heads/master
c: 89c8657
h: refs/heads/master
i:
  157301: 31eb435
  157299: 7a54cb9
  157295: fa4b475
v: v3
  • Loading branch information
Thomas Liu authored and James Morris committed Jun 24, 2009
1 parent 86f4e91 commit 010765b
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: a893a84e8799270fbec5c3708d001650aab47138
refs/heads/master: 89c86576ecde504da1eeb4f4882b2189ac2f9c4a
6 changes: 6 additions & 0 deletions trunk/security/selinux/avc.c
Original file line number Diff line number Diff line change
Expand Up @@ -970,3 +970,9 @@ u32 avc_policy_seqno(void)
{
return avc_cache.latest_notif;
}

void avc_disable(void)
{
if (avc_node_cachep)
kmem_cache_destroy(avc_node_cachep);
}
3 changes: 3 additions & 0 deletions trunk/security/selinux/hooks.c
Original file line number Diff line number Diff line change
Expand Up @@ -5683,6 +5683,9 @@ int selinux_disable(void)
selinux_disabled = 1;
selinux_enabled = 0;

/* Try to destroy the avc node cache */
avc_disable();

/* Reset security_ops to the secondary module, dummy or capability. */
security_ops = secondary_ops;

Expand Down
3 changes: 3 additions & 0 deletions trunk/security/selinux/include/avc.h
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,9 @@ int avc_add_callback(int (*callback)(u32 event, u32 ssid, u32 tsid,
int avc_get_hash_stats(char *page);
extern unsigned int avc_cache_threshold;

/* Attempt to free avc node cache */
void avc_disable(void);

#ifdef CONFIG_SECURITY_SELINUX_AVC_STATS
DECLARE_PER_CPU(struct avc_cache_stats, avc_cache_stats);
#endif
Expand Down

0 comments on commit 010765b

Please sign in to comment.