Commit e5cf15c2 authored by James Morris's avatar James Morris Committed by Linus Torvalds

[PATCH] SELinux: atomic_dec_and_test() bug

Atomic underflow debugging in this kernel exposed a bug in the AVC RCU
code, fix below.  The effect of this bug would be delayed node reclamation.
Signed-off-by: default avatarJames Morris <jmorris@redhat.com>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 6575328c
...@@ -281,7 +281,7 @@ static inline int avc_reclaim_node(void) ...@@ -281,7 +281,7 @@ static inline int avc_reclaim_node(void)
continue; continue;
list_for_each_entry(node, &avc_cache.slots[hvalue], list) { list_for_each_entry(node, &avc_cache.slots[hvalue], list) {
if (!atomic_dec_and_test(&node->ae.used)) { if (atomic_dec_and_test(&node->ae.used)) {
/* Recently Unused */ /* Recently Unused */
avc_node_delete(node); avc_node_delete(node);
ecx++; ecx++;
......
Markdown is supported
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