lkml.org 
[lkml]   [2004]   [Nov]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: 2.6.10-rc2-mm1 - 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: James Morris <jmorris@redhat.com>

---

diff -purN -X dontdiff linux-2.6.10-rc2-mm1.o/security/selinux/avc.c linux-2.6.10-rc2-mm1.w/security/selinux/avc.c
--- linux-2.6.10-rc2-mm1.o/security/selinux/avc.c 2004-11-16 10:57:16.000000000 -0500
+++ linux-2.6.10-rc2-mm1.w/security/selinux/avc.c 2004-11-16 11:27:19.000000000 -0500
@@ -269,7 +269,7 @@ static inline int avc_reclaim_node(void)
continue;

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 */
avc_node_delete(node);
avc_cache_stats_incr(reclaims);
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 14:08    [W:0.309 / U:0.016 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site