Whamcloud - gitweb
Branch b1_4
authoradilger <adilger>
Tue, 27 Sep 2005 23:46:59 +0000 (23:46 +0000)
committeradilger <adilger>
Tue, 27 Sep 2005 23:46:59 +0000 (23:46 +0000)
Description: MDS may oops in groups_free()
Details    : in rare race conditions a newly allocated group_info struct is
     freed again, and this can be NULL.  The 2.4 compatibility code
     for groups_free() checked for a NULL pointer, but 2.6 did not.
b=7273

lustre/ChangeLog
lustre/lvfs/upcall_cache.c

index 4b64143..d267673 100644 (file)
@@ -128,6 +128,14 @@ Description: improve by-nid export eviction on the MDS and OST
 Details    : allow multiple exports with the same NID to be evicted at one
             time without re-searching the exports list.
 
+Severity   : major
+Frequency  : rare, only with supplementary groups enabled on SMP 2.6 kernels
+Bugzilla   : 7273
+Description: MDS may oops in groups_free()
+Details    : in rare race conditions a newly allocated group_info struct is
+            freed again, and this can be NULL.  The 2.4 compatibility code
+            for groups_free() checked for a NULL pointer, but 2.6 did not.
+
 ------------------------------------------------------------------------------
 
 08-26-2005  Cluster File Systems, Inc. <info@clusterfs.com>
index a8bb2b6..ea33ee7 100644 (file)
@@ -66,9 +66,6 @@ struct group_info *groups_alloc(int ngroups)
 
 void groups_free(struct group_info *ginfo)
 {
-        if (!ginfo)
-                return;
-
         LASSERT(ginfo->ngroups <= NGROUPS_SMALL);
         LASSERT(ginfo->nblocks == 1);
         LASSERT(ginfo->blocks[0] == ginfo->small_block);
@@ -96,7 +93,8 @@ static struct upcall_cache_entry *alloc_entry(__u64 key)
 /* protected by hash lock */
 static void free_entry(struct upcall_cache_entry *entry)
 {
-        groups_free(entry->ue_group_info);
+        if (entry->ue_group_info)
+                groups_free(entry->ue_group_info);
         list_del(&entry->ue_hash);
         CDEBUG(D_OTHER, "destroy cache entry %p for key "LPU64"\n",
                entry, entry->ue_key);