Whamcloud - gitweb
Branch b1_6
authorjohann <johann>
Tue, 19 May 2009 11:09:39 +0000 (11:09 +0000)
committerjohann <johann>
Tue, 19 May 2009 11:09:39 +0000 (11:09 +0000)
b=19453
i=adilger
i=girish

fix wrong initialization of xattr entry in the ea in inode patch.
Only RHEL4 & SLES9 are concerned.

ldiskfs/kernel_patches/patches/ext3-ea-in-inode-2.6-rhel4.patch
ldiskfs/kernel_patches/patches/ext3-ea-in-inode-2.6-suse.patch

index bf3ba6c..3aced41 100644 (file)
@@ -627,12 +627,12 @@ Index: linux-2.6.9-67.0.20/fs/ext3/xattr.c
 +      if (value) {
 +              int offs = min_offs - value_len;
 +              /* use last to create new entry */
++              memset(last, 0, esize);
 +              last->e_name_len = strlen(name);
 +              last->e_name_index = name_index;
 +              last->e_value_offs = cpu_to_le16(offs);
 +              last->e_value_size = cpu_to_le32(value_len);
 +              last->e_hash = last->e_value_block = 0;
-+              memset(last->e_name, 0, esize);
 +              memcpy(last->e_name, name, last->e_name_len);
 +              if (start + offs + value_len > end)
 +                      printk("ALERT at %s:%d: 0x%p + %d + %zd > 0x%p\n",
index 18efe81..dcd87ed 100644 (file)
@@ -617,12 +617,12 @@ Index: linux-2.6.5-7.311/fs/ext3/xattr.c
 +      if (value) {
 +              int offs = min_offs - value_len;
 +              /* use last to create new entry */
++              memset(last, 0, esize);
 +              last->e_name_len = strlen(name);
 +              last->e_name_index = name_index;
 +              last->e_value_offs = cpu_to_le16(offs);
 +              last->e_value_size = cpu_to_le32(value_len);
 +              last->e_hash = last->e_value_block = 0;
-+              memset(last->e_name, 0, esize);
 +              memcpy(last->e_name, name, last->e_name_len);
 +              if (start + offs + value_len > end)
 +                      printk("ALERT at %s:%d: 0x%p + %d + %zd > 0x%p\n",