From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from relay.sgi.com (relay1.corp.sgi.com [137.38.102.111]) by oss.sgi.com (Postfix) with ESMTP id A80307F37 for ; Mon, 6 Jan 2014 08:38:12 -0600 (CST) Message-ID: <52CABFD1.70100@sgi.com> Date: Mon, 06 Jan 2014 08:38:09 -0600 From: Mark Tinguely MIME-Version: 1.0 Subject: Re: [PATCH] xfs: fix off-by-one error in xfs_attr3_rmt_verify References: <52C3FBC3.3050304@oracle.com> In-Reply-To: <52C3FBC3.3050304@oracle.com> List-Id: XFS Filesystem from SGI List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Errors-To: xfs-bounces@oss.sgi.com Sender: xfs-bounces@oss.sgi.com To: Jeff Liu Cc: "xfs@oss.sgi.com" On 01/01/14 05:28, Jeff Liu wrote: > From: Jie Liu > > With CRC check is enabled, if trying to set an attributes value just > equal to the maximum size of XATTR_SIZE_MAX would cause the v3 remote > attr write verification procedure failure, which would yield the back > trace like below: > > > XFS (sda7): Internal error xfs_attr3_rmt_write_verify at line 191 of file fs/xfs/xfs_attr_remote.c > > Call Trace: > [] dump_stack+0x45/0x56 > [] xfs_error_report+0x3b/0x40 [xfs] > [] ? _xfs_buf_ioapply+0x6d/0x390 [xfs] > [] xfs_corruption_error+0x55/0x80 [xfs] > [] xfs_attr3_rmt_write_verify+0x14b/0x1a0 [xfs] > [] ? _xfs_buf_ioapply+0x6d/0x390 [xfs] > [] ? xfs_bdstrat_cb+0x55/0xb0 [xfs] > [] _xfs_buf_ioapply+0x6d/0x390 [xfs] > [] ? vm_map_ram+0x31a/0x460 > [] ? wake_up_state+0x20/0x20 > [] ? xfs_bdstrat_cb+0x55/0xb0 [xfs] > [] xfs_buf_iorequest+0x6b/0xc0 [xfs] > [] xfs_bdstrat_cb+0x55/0xb0 [xfs] > [] xfs_bwrite+0x46/0x80 [xfs] > [] xfs_attr_rmtval_set+0x334/0x490 [xfs] > [] xfs_attr_leaf_addname+0x24a/0x410 [xfs] > [] xfs_attr_set_int+0x223/0x470 [xfs] > [] xfs_attr_set+0x96/0xb0 [xfs] > [] xfs_xattr_set+0x42/0x70 [xfs] > [] generic_setxattr+0x62/0x80 > [] __vfs_setxattr_noperm+0x63/0x1b0 > [] ? evm_inode_setxattr+0xe/0x10 > [] vfs_setxattr+0xb5/0xc0 > [] setxattr+0x12e/0x1c0 > [] ? final_putname+0x22/0x50 > [] ? putname+0x2b/0x40 > [] ? user_path_at_empty+0x5f/0x90 > [] ? __sb_start_write+0x49/0xe0 > [] ? vm_mmap_pgoff+0x99/0xc0 > [] SyS_setxattr+0x8f/0xe0 > [] system_call_fastpath+0x1a/0x1f > > Tests: > setfattr -n user.longxattr -v `perl -e 'print "A"x65536'` testfile > > This patch fix it to check the remote EA size is greater than the > XATTR_SIZE_MAX rather than more than or equal to it, because it's > valid if the specified EA value size is equal to the limitation as > per VFS setxattr interface. > > Signed-off-by: Jie Liu > --- Good catch. Are you making an edge case xfstest? Reviewed-by: Mark Tinguely _______________________________________________ xfs mailing list xfs@oss.sgi.com http://oss.sgi.com/mailman/listinfo/xfs