[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

TAKE - EA short-form conversion bug in XFS kernel



Resending to thebarn... as it didn't get thru on oss.
Nathan, could you p_modmerge to 2.5 please.

Date: Mon, 8 Apr 2002 16:33:14 +1000 (EST)
From: Timothy Shimmin <tes@snort.melbourne.sgi.com>
To: linux-xfs@oss.sgi.com
Subject: TAKE - EA short-form conversion bug in XFS kernel

This bug is evident, for example,  when one has more
than one EA and one deletes an EA and the remaining EAs
can now fit into the inode but their individual sizes are greater
than 254 bytes. 
The bug then puts the EAs into the short form format in the inode
but the lengths are truncated to fit into 1 byte.
This was evident with 1K inodes (large enough to fit an ACL) and 
changing the default and access ACLs on a file with existing
default and access ACLs. In this case we delete an ACL/EA and
then go to convert the remaining ACL/EA to shortform as
it now fits in the inode. But its size of 304 bytes (fixed size for ACLs)
means the EA valuelen field (1 byte in size) is now wrong.

--Tim

Date:  Sun Apr  7 23:19:06 PDT 2002
Workarea:  snort.melbourne.sgi.com:/home/diskb/build4/tes/slinx-xfs

The following file(s) were checked into:
  bonnie.engr.sgi.com:/isms/slinx/2.4.x-xfs


Modid:  2.4.x-xfs:slinx:115916a
linux/fs/xfs/xfs_attr_leaf.c - 1.59
	- Apply olaf@sgi.com's fix for xfs_attr_shortform_allfit().
	  xfs_attr_shortform_allfit() determines if an EA will
	  fit into the short form format but forgets to test if the
	  valuelen will fit into 1 byte. We limit the length of the
	  value even if it fits into the inode's attribute fork.
	  pv#853637