Re: [ 03/19] reiserfs: Fix warning and inode leak when deleting inode with xattrs

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

 



After 4 days with patch filesystem is clean (15 mln files deleted/unlinked, 17 mln files created or hardlinked ), no errors in dmesg.
Test of  files ACL - passed  (tested ~100 000 files/dirs)


On 2013-04-11 00:50, Greg Kroah-Hartman wrote:
3.0-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Jan Kara <jack@xxxxxxx>

commit 35e5cbc0af240778e61113286c019837e06aeec6 upstream.

After commit 21d8a15a (lookup_one_len: don't accept . and ..) reiserfs
started failing to delete xattrs from inode. This was due to a buggy
test for '.' and '..' in fill_with_dentries() which resulted in passing
'.' and '..' entries to lookup_one_len() in some cases. That returned
error and so we failed to iterate over all xattrs of and inode.

Fix the test in fill_with_dentries() along the lines of the one in
lookup_one_len().

Reported-by: Pawel Zawora <pzawora@xxxxxxxxx>
Signed-off-by: Jan Kara <jack@xxxxxxx>
Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>

---
  fs/reiserfs/xattr.c |    4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)

--- a/fs/reiserfs/xattr.c
+++ b/fs/reiserfs/xattr.c
@@ -187,8 +187,8 @@ fill_with_dentries(void *buf, const char
  	if (dbuf->count == ARRAY_SIZE(dbuf->dentries))
  		return -ENOSPC;
- if (name[0] == '.' && (name[1] == '\0' ||
-			       (name[1] == '.' && name[2] == '\0')))
+	if (name[0] == '.' && (namelen < 2 ||
+			       (namelen == 2 && name[1] == '.')))
  		return 0;
dentry = lookup_one_len(name, dbuf->xadir, namelen);




--
To unsubscribe from this list: send the line "unsubscribe stable" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Kernel]     [Kernel Development Newbies]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]