Re: [PATCH] ext3/4: fix uninitialized bs in ext3/4_xattr_set_handle()
- Date: Tue, 13 May 2008 14:18:12 +0530
- From: Kalpak Shah <Kalpak.Shah@xxxxxxx>
- Subject: Re: [PATCH] ext3/4: fix uninitialized bs in ext3/4_xattr_set_handle()
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@xxxxxxxxxxxxxxx > More majordomo info at http://vger.kernel.org/majordomo-info.html
Attachment:
reproducer.sh
Description: application/shellscript
- References:
- [PATCH] ext3/4: fix uninitialized bs in ext3/4_xattr_set_handle()
- From: Tiger Yang
- Re: [PATCH] ext3/4: fix uninitialized bs in ext3/4_xattr_set_handle()
- From: Eric Sandeen
- [PATCH] ext3/4: fix uninitialized bs in ext3/4_xattr_set_handle()
- Prev by Date: Re: [Bisected] Latest git will not boot on MacBook
- Next by Date: Re: [PATCH] drivers/scsi/qla1280.c; was Re: Buffered I/O to block device very slow and other SCSI issues...
- Previous by thread: Re: [PATCH] ext3/4: fix uninitialized bs in ext3/4_xattr_set_handle()
- Next by thread: [PATCH 0/3] Blackfin Sports UART Driver fixing
- Index(es):