All of lore.kernel.org
 help / color / mirror / Atom feed
From: Kalpak Shah <Kalpak.Shah@Sun.COM>
To: Eric Sandeen <sandeen@redhat.com>
Cc: Tiger Yang <tiger.yang@oracle.com>,
	linux-ext4@vger.kernel.org, linux-fsdevel@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] ext3/4: fix uninitialized bs in	ext3/4_xattr_set_handle()
Date: Tue, 13 May 2008 14:18:12 +0530	[thread overview]
Message-ID: <1210668492.4016.6.camel@localhost> (raw)
In-Reply-To: <4828DE73.2070001@redhat.com>

[-- Attachment #1: Type: text/plain, Size: 1294 bytes --]

Hi Eric,

On Mon, 2008-05-12 at 19:18 -0500, Eric Sandeen wrote:
> Tiger Yang wrote:
> > Hi,
> > I met a bug when I try to replace a xattr entry in ibody with a big size 
> > value. But in ibody there has no space for the new value. So it should 
> > set new xattr entry in block and remove the old xattr entry in ibody.
> > 
> > Best regards,
> > tiger
> > 
> 
> Tiger, do you have a testcase handy to demonstrate this?

Attached is a simple script to reproduce the problem.

> 
> Is the new, large out-of-inode xattr unique so that it does not match
> any existing attribute block, I assume?

I don't quite understand what you mean but the problem is that in
ext3_xattr_set_handle(), the EA being replaced is found in the
inode-body (by function ext3_xattr_ibody_find) and hence
ext3_xattr_block_find() is not called initially. So in this test-case
when we have to delete an EA from the inode and add it into the external
block, bs turns out to be uninitialized and therefore a new EA block
gets allocated instead of the existing one being used.

Thanks,
Kalpak

> 
> Thanks,
> 
> -Eric
> --
> To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

[-- Attachment #2: reproducer.sh --]
[-- Type: application/x-shellscript, Size: 1018 bytes --]

      parent reply	other threads:[~2008-05-13  8:48 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-05-12  3:24 [PATCH] ext3/4: fix uninitialized bs in ext3/4_xattr_set_handle() Tiger Yang
2008-05-13  0:02 ` Andrew Morton
2008-05-13  2:31   ` Tiger Yang
2008-05-13 20:00     ` Andreas Dilger
2008-05-14 10:56     ` Andreas Gruenbacher
2008-05-14 16:00       ` [stable] " Greg KH
2008-05-14 17:28         ` Andrew Morton
2008-05-14 22:30           ` Theodore Tso
2008-05-14 22:54             ` Andrew Morton
2008-05-13  0:18 ` Eric Sandeen
2008-05-13  7:48   ` Tiger Yang
2008-05-13 12:48     ` Eric Sandeen
2008-05-13  8:48   ` Kalpak Shah [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1210668492.4016.6.camel@localhost \
    --to=kalpak.shah@sun.com \
    --cc=linux-ext4@vger.kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=sandeen@redhat.com \
    --cc=tiger.yang@oracle.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.