<!-- 
RSS generated by JIRA (9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c) at Sat Feb 10 02:02:59 UTC 2024

It is possible to restrict the fields that are returned in this document by specifying the 'field' parameter in your request.
For example, to request only the issue key and summary append 'field=key&field=summary' to the URL of your request.
-->
<rss version="0.92" >
<channel>
    <title>Whamcloud Community JIRA</title>
    <link>https://jira.whamcloud.com</link>
    <description>This file is an XML representation of an issue</description>
    <language>en-us</language>    <build-info>
        <version>9.4.14</version>
        <build-number>940014</build-number>
        <build-date>05-12-2023</build-date>
    </build-info>


<item>
            <title>[LU-6757] conf-sanity test_61: trusted.big different after saving</title>
                <link>https://jira.whamcloud.com/browse/LU-6757</link>
                <project id="10000" key="LU">Lustre</project>
                    <description>&lt;p&gt;This issue was created by maloo for sarah_lw &amp;lt;wei3.liu@intel.com&amp;gt;&lt;/p&gt;

&lt;p&gt;This issue relates to the following test suite run: &lt;a href=&quot;https://testing.hpdd.intel.com/test_sets/74ee0e8e-13d8-11e5-b4b0-5254006e85c2&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://testing.hpdd.intel.com/test_sets/74ee0e8e-13d8-11e5-b4b0-5254006e85c2&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;The sub-test test_61 failed with the following error:&lt;/p&gt;
&lt;div class=&quot;preformatted panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;preformattedContent panelContent&quot;&gt;
&lt;pre&gt;trusted.big different after saving
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;MDS dmesg&lt;/p&gt;
&lt;div class=&quot;preformatted panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;preformattedContent panelContent&quot;&gt;
&lt;pre&gt;[10669.620927] Lustre: DEBUG MARKER: /usr/sbin/lctl mark save large xattr trusted.big on \/mnt\/lustre\/f61.conf-sanity
[10669.768885] Lustre: DEBUG MARKER: save large xattr trusted.big on /mnt/lustre/f61.conf-sanity
[10669.796354] ------------[ cut here ]------------
[10669.801490] WARNING: at /var/lib/jenkins/workspace/lustre-master/arch/x86_64/build_type/server/distro/el7/ib_stack/inkernel/BUILD/BUILD/lustre-2.7.55/ldiskfs/ldiskfs.h:2631 ldiskfs_xattr_set_entry+0x7c4/0x7f0 [ldiskfs]()
[10669.809597] Modules linked in: osp(OF) mdd(OF) lod(OF) mdt(OF) lfsck(OF) mgs(OF) mgc(OF) osd_ldiskfs(OF) lquota(OF) fid(OF) fld(OF) ksocklnd(OF) ptlrpc(OF) obdclass(OF) lnet(OF) libcfs(OF) ldiskfs(OF) sha512_generic dm_mod rpcsec_gss_krb5 auth_rpcgss nfsv4 dns_resolver nfs lockd fscache xprtrdma sunrpc ib_isert iscsi_target_mod ib_iser libiscsi scsi_transport_iscsi ib_srpt target_core_mod ib_srp scsi_transport_srp scsi_tgt ib_ipoib rdma_ucm ib_ucm ib_uverbs ib_umad rdma_cm ib_cm iw_cm ib_sa ib_mad ppdev parport_pc virtio_balloon serio_raw pcspkr parport i2c_piix4 ib_core ib_addr ext4 mbcache jbd2 ata_generic pata_acpi virtio_blk cirrus syscopyarea sysfillrect ata_piix sysimgblt drm_kms_helper virtio_pci virtio_ring virtio ttm 8139too drm 8139cp i2c_core mii libata floppy [last unloaded: libcfs]
[10669.827111] CPU: 0 PID: 7739 Comm: mdt00_002 Tainted: GF          O--------------   3.10.0-229.4.2.el7_lustre.x86_64 #1
[10669.829588] Hardware name: Red Hat KVM, BIOS 0.5.1 01/01/2007
[10669.831727]  0000000000000000 00000000510e8244 ffff88006cd67710 ffffffff816050da
[10669.834182]  ffff88006cd67748 ffffffff8106e34b ffff8800655e9e88 ffff88007ac63cf0
[10669.836691]  ffff88006cd67898 0000000000010000 ffff88006571c068 ffff88006cd67758
[10669.839122] Call Trace:
[10669.841102]  [&amp;lt;ffffffff816050da&amp;gt;] dump_stack+0x19/0x1b
[10669.843216]  [&amp;lt;ffffffff8106e34b&amp;gt;] warn_slowpath_common+0x6b/0xb0
[10669.845424]  [&amp;lt;ffffffff8106e49a&amp;gt;] warn_slowpath_null+0x1a/0x20
[10669.847584]  [&amp;lt;ffffffffa05db334&amp;gt;] ldiskfs_xattr_set_entry+0x7c4/0x7f0 [ldiskfs]
[10669.849899]  [&amp;lt;ffffffffa05dbdd5&amp;gt;] ldiskfs_xattr_ibody_set+0x35/0x90 [ldiskfs]
[10669.852135]  [&amp;lt;ffffffffa05dc1c4&amp;gt;] ldiskfs_xattr_set_handle+0x1a4/0x500 [ldiskfs]
[10669.854442]  [&amp;lt;ffffffffa05dc666&amp;gt;] ldiskfs_xattr_set+0x146/0x1c0 [ldiskfs]
[10669.856627]  [&amp;lt;ffffffffa0607f0d&amp;gt;] ldiskfs_xattr_trusted_set+0x2d/0x30 [ldiskfs]
[10669.858871]  [&amp;lt;ffffffff811eb4b2&amp;gt;] generic_setxattr+0x62/0x80
[10669.860919]  [&amp;lt;ffffffffa0ba62cc&amp;gt;] osd_xattr_set+0x3ec/0x700 [osd_ldiskfs]
[10669.863083]  [&amp;lt;ffffffffa0e29187&amp;gt;] lod_sub_object_xattr_set+0x227/0x460 [lod]
[10669.865182]  [&amp;lt;ffffffffa0e150d9&amp;gt;] lod_xattr_set_internal+0xb9/0x2d0 [lod]
[10669.867329]  [&amp;lt;ffffffffa0e20fb6&amp;gt;] lod_xattr_set+0x136/0x3f0 [lod]
[10669.869422]  [&amp;lt;ffffffffa0e83673&amp;gt;] mdd_xattr_set+0x483/0x720 [mdd]
[10669.872412]  [&amp;lt;ffffffffa0d453c7&amp;gt;] ? mdt_version_save+0x67/0x120 [mdt]
[10669.875322]  [&amp;lt;ffffffffa0d51b57&amp;gt;] mdt_reint_setxattr+0x967/0xf90 [mdt]
[10669.878297]  [&amp;lt;ffffffffa0d4f1d0&amp;gt;] mdt_reint_rec+0x80/0x210 [mdt]
[10669.880537]  [&amp;lt;ffffffffa0d32e6c&amp;gt;] mdt_reint_internal+0x58c/0x780 [mdt]
[10669.882681]  [&amp;lt;ffffffffa0d3c167&amp;gt;] mdt_reint+0x67/0x140 [mdt]
[10669.884691]  [&amp;lt;ffffffffa0a047e5&amp;gt;] tgt_request_handle+0x6d5/0x1060 [ptlrpc]
[10669.886831]  [&amp;lt;ffffffffa09b472b&amp;gt;] ptlrpc_server_handle_request+0x21b/0xa90 [ptlrpc]
[10669.888956]  [&amp;lt;ffffffffa09b22a8&amp;gt;] ? ptlrpc_wait_event+0x98/0x340 [ptlrpc]
[10669.891045]  [&amp;lt;ffffffffa0561967&amp;gt;] ? libcfs_debug_msg+0x57/0x80 [libcfs]
[10669.893039]  [&amp;lt;ffffffffa09b8918&amp;gt;] ptlrpc_main+0xaf8/0x1ea0 [ptlrpc]
[10669.895022]  [&amp;lt;ffffffff810ad8b6&amp;gt;] ? __dequeue_entity+0x26/0x40
[10669.896880]  [&amp;lt;ffffffffa09b7e20&amp;gt;] ? ptlrpc_register_service+0xf00/0xf00 [ptlrpc]
[10669.898876]  [&amp;lt;ffffffff8109739f&amp;gt;] kthread+0xcf/0xe0
[10669.900601]  [&amp;lt;ffffffff810972d0&amp;gt;] ? kthread_create_on_node+0x140/0x140
[10669.902499]  [&amp;lt;ffffffff81614f7c&amp;gt;] ret_from_fork+0x7c/0xb0
[10669.904251]  [&amp;lt;ffffffff810972d0&amp;gt;] ? kthread_create_on_node+0x140/0x140
[10669.906128] ---[ end trace 28efa5c9df746bee ]---
[10669.911949] LustreError: 7739:0:(mdt_handler.c:891:mdt_getattr_internal()) lustre-MDT0000: getattr error for [0x200000401:0x1:0x0]: rc = -5
[10670.039079] Lustre: DEBUG MARKER: /usr/sbin/lctl mark  conf-sanity test_61: @@@@@@ FAIL: trusted.big different after saving 
[10670.184684] Lustre: DEBUG MARKER: conf-sanity test_61: @@@@@@ FAIL: trusted.big different after saving
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</description>
                <environment>server: lustre-master build # 3071 EL7 ldiskfs&lt;br/&gt;
client: lustre-master build #3071 EL6</environment>
        <key id="30790">LU-6757</key>
            <summary>conf-sanity test_61: trusted.big different after saving</summary>
                <type id="1" iconUrl="https://jira.whamcloud.com/secure/viewavatar?size=xsmall&amp;avatarId=11303&amp;avatarType=issuetype">Bug</type>
                                            <priority id="2" iconUrl="https://jira.whamcloud.com/images/icons/priorities/critical.svg">Critical</priority>
                        <status id="5" iconUrl="https://jira.whamcloud.com/images/icons/statuses/resolved.png" description="A resolution has been taken, and it is awaiting verification by reporter. From here issues are either reopened, or are closed.">Resolved</status>
                    <statusCategory id="3" key="done" colorName="success"/>
                                    <resolution id="1">Fixed</resolution>
                                        <assignee username="yujian">Jian Yu</assignee>
                                    <reporter username="maloo">Maloo</reporter>
                        <labels>
                    </labels>
                <created>Tue, 23 Jun 2015 22:00:40 +0000</created>
                <updated>Thu, 25 Feb 2016 22:13:52 +0000</updated>
                            <resolved>Wed, 26 Aug 2015 17:39:03 +0000</resolved>
                                    <version>Lustre 2.8.0</version>
                                    <fixVersion>Lustre 2.8.0</fixVersion>
                                        <due></due>
                            <votes>0</votes>
                                    <watches>10</watches>
                                                                            <comments>
                            <comment id="120304" author="pjones" created="Fri, 3 Jul 2015 18:46:10 +0000"  >&lt;p&gt;Jian&lt;/p&gt;

&lt;p&gt;Could you please look into this issue?&lt;/p&gt;

&lt;p&gt;Thanks&lt;/p&gt;

&lt;p&gt;Peter&lt;/p&gt;</comment>
                            <comment id="123929" author="yujian" created="Wed, 12 Aug 2015 07:33:50 +0000"  >&lt;p&gt;On client:&lt;/p&gt;
&lt;div class=&quot;preformatted panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;preformattedContent panelContent&quot;&gt;
&lt;pre&gt;getfattr: /mnt/lustre/f61.conf-sanity: Input/output error
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;div class=&quot;preformatted panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;preformattedContent panelContent&quot;&gt;
&lt;pre&gt;00000002:00000001:0.0:1439363436.401810:0:5372:0:(mdc_locks.c:571:mdc_finish_enqueue()) Process entered
00000002:00100000:0.0:1439363436.401812:0:5372:0:(mdc_locks.c:625:mdc_finish_enqueue()) @@@ op: 8 disposition: b, status: -5  req@ffff8800796ed800 x1509281914421388/t0(0) o101-&amp;gt;lustre-MDT0000-mdc-ffff880078fbf000@10.100.4.86@tcp:12/10 lens 584/536 e 0 to 0 dl 1439363443 ref 1 fl Complete:R/0/0 rc 301/301
&amp;lt;~snip~&amp;gt;
00000002:00000001:0.0:1439363436.401820:0:5372:0:(mdc_locks.c:955:mdc_finish_intent_lock()) Process entered
00000002:00000001:0.0:1439363436.401821:0:5372:0:(mdc_locks.c:979:mdc_finish_intent_lock()) Process leaving (rc=18446744073709551611 : -5 : fffffffffffffffb)
00000002:00000001:0.0:1439363436.401822:0:5372:0:(mdc_locks.c:1182:mdc_intent_lock()) Process leaving (rc=18446744073709551611 : -5 : fffffffffffffffb)
00800000:00000001:0.0:1439363436.401823:0:5372:0:(obd_class.h:1535:md_intent_lock()) Process leaving (rc=18446744073709551611 : -5 : fffffffffffffffb)
00800000:00000001:0.0:1439363436.401824:0:5372:0:(lmv_intent.c:410:lmv_intent_lookup()) Process leaving (rc=18446744073709551611 : -5 : fffffffffffffffb)
00800000:00000001:0.0:1439363436.401825:0:5372:0:(lmv_intent.c:530:lmv_intent_lock()) Process leaving (rc=18446744073709551611 : -5 : fffffffffffffffb)
00000080:00000001:0.0:1439363436.401826:0:5372:0:(obd_class.h:1535:md_intent_lock()) Process leaving (rc=18446744073709551611 : -5 : fffffffffffffffb)
00000080:00000001:0.0:1439363436.401827:0:5372:0:(namei.c:590:ll_lookup_it()) Process leaving via out (rc=18446744073709551611 : -5 : 0xfffffffffffffffb)
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;On MDS:&lt;/p&gt;
&lt;div class=&quot;preformatted panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;preformattedContent panelContent&quot;&gt;
&lt;pre&gt;00000004:00000001:0.0:1439363436.853113:0:26612:0:(lod_object.c:1355:lod_xattr_get()) Process entered
00000004:00000001:0.0:1439363436.853119:0:26612:0:(lod_object.c:1395:lod_xattr_get()) Process leaving (rc=18446744073709551611 : -5 : fffffffffffffffb)
00000004:00000001:0.0:1439363436.853121:0:26612:0:(mdd_object.c:244:mdd_xattr_get()) Process leaving (rc=18446744073709551611 : -5 : fffffffffffffffb)
00000004:00000001:0.0:1439363436.853122:0:26612:0:(mdt_handler.c:802:mdt_attr_get_complex()) Process leaving via out (rc=18446744073709551611 : -5 : 0xfffffffffffffffb)
00000004:00000002:0.0:1439363436.853123:0:26612:0:(mdt_handler.c:861:mdt_attr_get_complex()) after getattr rc = -5, ma_valid = 0x1 ma_lmm=ffff88006982a340
00000004:00000001:0.0:1439363436.853124:0:26612:0:(mdt_handler.c:862:mdt_attr_get_complex()) Process leaving (rc=18446744073709551611 : -5 : fffffffffffffffb)
00000004:00020000:0.0:1439363436.853125:0:26612:0:(mdt_handler.c:951:mdt_getattr_internal()) lustre-MDT0000: getattr error for [0x200000400:0x1:0x0]: rc = -5
00000004:00000001:0.0:1439363436.856913:0:26612:0:(mdt_handler.c:952:mdt_getattr_internal()) Process leaving (rc=18446744073709551611 : -5 : fffffffffffffffb)
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Still investigate.&lt;/p&gt;</comment>
                            <comment id="124206" author="yujian" created="Sat, 15 Aug 2015 00:52:51 +0000"  >&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;# Get the maximum xattr size supported by the filesystem.
max_xattr_size() {      
    local size  
        
    &lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; large_xattr_enabled; then
        # include/linux/limits.h: #define XATTR_SIZE_MAX 65536
        size=65536
    &lt;span class=&quot;code-keyword&quot;&gt;else&lt;/span&gt;
        local mds_dev=$(mdsdevname ${SINGLEMDS&lt;span class=&quot;code-comment&quot;&gt;//mds/})
&lt;/span&gt;        local block_size=$(get_block_size $SINGLEMDS $mds_dev)

        # maximum xattr size = size of block - size of header -
        #                      size of 1 entry - 4 &lt;span class=&quot;code-keyword&quot;&gt;null&lt;/span&gt; bytes
        size=$((block_size - 32 - 32 - 4))
    fi
    
    echo $size
}
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Testing showed that after large_xattr was enabled, the test would fail on RHEL 7.1 while the maximum xattr size exceeded $((block_size - 32 - 32 - 4)). So, large xattr did not work.&lt;/p&gt;

&lt;p&gt;I&apos;m looking into ldiskfs_xattr_set_entry().&lt;/p&gt;</comment>
                            <comment id="124373" author="yujian" created="Tue, 18 Aug 2015 00:39:01 +0000"  >&lt;p&gt;The problematic source code is:&lt;/p&gt;
&lt;div class=&quot;preformatted panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;preformattedContent panelContent&quot;&gt;
&lt;pre&gt;# gdb &quot;$(modinfo -n ldiskfs)&quot;
&amp;lt;~snip~&amp;gt;
Reading symbols from /usr/lib/modules/3.10.0-229.4.2.el7_lustre.x86_64/extra/kernel/fs/lustre/ldiskfs.ko...Reading symbols from /usr/lib/debug/lib/modules/3.10.0-229.4.2.el7_lustre.x86_64/extra/kernel/fs/lustre/ldiskfs.ko.debug...done.
done.
(gdb) list *(ldiskfs_xattr_set_entry+0x7c4)
0x1e244 is in ldiskfs_xattr_set_entry (/usr/src/debug/lustre-2.7.0/ldiskfs/ldiskfs.h:2637).
2632    #endif
2633
2634    /* Update i_disksize. Requires i_mutex to avoid races with truncate */
2635    static inline void ldiskfs_update_i_disksize(struct inode *inode, loff_t newsize)
2636    {
2637            WARN_ON_ONCE(S_ISREG(inode-&amp;gt;i_mode) &amp;amp;&amp;amp;
2638                         !mutex_is_locked(&amp;amp;inode-&amp;gt;i_mutex));
2639            down_write(&amp;amp;LDISKFS_I(inode)-&amp;gt;i_data_sem);
2640            if (newsize &amp;gt; LDISKFS_I(inode)-&amp;gt;i_disksize)
2641                    LDISKFS_I(inode)-&amp;gt;i_disksize = newsize;
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</comment>
                            <comment id="124374" author="yujian" created="Tue, 18 Aug 2015 02:08:48 +0000"  >&lt;p&gt;The i_mutex lock needs to be acquired before calling ext4_update_i_disksize() in xattr.c.&lt;br/&gt;
I&apos;m creating the patch.&lt;/p&gt;</comment>
                            <comment id="124380" author="gerrit" created="Tue, 18 Aug 2015 08:34:24 +0000"  >&lt;p&gt;Jian Yu (jian.yu@intel.com) uploaded a new patch: &lt;a href=&quot;http://review.whamcloud.com/16012&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://review.whamcloud.com/16012&lt;/a&gt;&lt;br/&gt;
Subject: &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-6757&quot; title=&quot;conf-sanity test_61: trusted.big different after saving&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-6757&quot;&gt;&lt;del&gt;LU-6757&lt;/del&gt;&lt;/a&gt; ldiskfs: acquire i_mutex lock for ext4_update_i_disksize&lt;br/&gt;
Project: fs/lustre-release&lt;br/&gt;
Branch: master&lt;br/&gt;
Current Patch Set: 1&lt;br/&gt;
Commit: 2dd614101cc3e7c5d0b8c5cc6d88e1c07fa55141&lt;/p&gt;</comment>
                            <comment id="124865" author="yujian" created="Mon, 24 Aug 2015 06:29:12 +0000"  >&lt;p&gt;The root cause of lod_xattr_get() returning &quot;-5&quot; (-EIO) error is related to the following changes in ext4_xattr_check_names() for the RHEL 7.1 kernel version 3.10.0:&lt;/p&gt;
&lt;div class=&quot;preformatted panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;preformattedContent panelContent&quot;&gt;
&lt;pre&gt;author	Darrick J. Wong &amp;lt;darrick.wong@oracle.com&amp;gt;	2014-09-16 18:34:59 (GMT)
committer	Theodore Ts&apos;o &amp;lt;tytso@mit.edu&amp;gt;	2014-09-16 18:34:59 (GMT)
commit	a0626e75954078cfacddb00a4545dde821170bc5 (patch)
tree	61aeb6747c5fc7016ac54cc704fb6d9b1833674d
parent	684de5748660e16e185754697ac0afa9e18297f6 (diff)
ext4: check EA value offset when loading
When loading extended attributes, check each entry&apos;s value offset to
make sure it doesn&apos;t collide with the entries.

Without this check it is easy to crash the kernel by mounting a
malicious FS containing a file with an EA wherein e_value_offs = 0 and
e_value_size &amp;gt; 0 and then deleting the EA, which corrupts the name
list.

(See the f_ea_value_crash test&apos;s FS image in e2fsprogs for an example.)

Signed-off-by: Darrick J. Wong &amp;lt;darrick.wong@oracle.com&amp;gt;
Signed-off-by: Theodore Ts&apos;o &amp;lt;tytso@mit.edu&amp;gt;
Cc: stable@vger.kernel.org
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;diff --git a/fs/ext4/xattr.c b/fs/ext4/xattr.c
index da4df70..42823ab 100644
--- a/fs/ext4/xattr.c
+++ b/fs/ext4/xattr.c
@@ -190,14 +190,28 @@ ext4_listxattr(struct dentry *dentry, &lt;span class=&quot;code-object&quot;&gt;char&lt;/span&gt; *buffer, size_t size)
 }
 
 &lt;span class=&quot;code-keyword&quot;&gt;static&lt;/span&gt; &lt;span class=&quot;code-object&quot;&gt;int&lt;/span&gt;
-ext4_xattr_check_names(struct ext4_xattr_entry *entry, void *end)
+ext4_xattr_check_names(struct ext4_xattr_entry *entry, void *end,
+		       void *value_start)
 {
-	&lt;span class=&quot;code-keyword&quot;&gt;while&lt;/span&gt; (!IS_LAST_ENTRY(entry)) {
-		struct ext4_xattr_entry *next = EXT4_XATTR_NEXT(entry);
+	struct ext4_xattr_entry *e = entry;
+
+	&lt;span class=&quot;code-keyword&quot;&gt;while&lt;/span&gt; (!IS_LAST_ENTRY(e)) {
+		struct ext4_xattr_entry *next = EXT4_XATTR_NEXT(e);
 		&lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; ((void *)next &amp;gt;= end)
 			&lt;span class=&quot;code-keyword&quot;&gt;return&lt;/span&gt; -EIO;
-		entry = next;
+		e = next;
 	}
+
+	&lt;span class=&quot;code-keyword&quot;&gt;while&lt;/span&gt; (!IS_LAST_ENTRY(entry)) {
+		&lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; (entry-&amp;gt;e_value_size != 0 &amp;amp;&amp;amp;
+		    (value_start + le16_to_cpu(entry-&amp;gt;e_value_offs) &amp;lt;
+		     (void *)e + sizeof(__u32) ||
+		     value_start + le16_to_cpu(entry-&amp;gt;e_value_offs) +
+		    le32_to_cpu(entry-&amp;gt;e_value_size) &amp;gt; end))
+			&lt;span class=&quot;code-keyword&quot;&gt;return&lt;/span&gt; -EIO;{color}                                               ------------&amp;gt; here
+		entry = EXT4_XATTR_NEXT(entry);
+	}
+
 	&lt;span class=&quot;code-keyword&quot;&gt;return&lt;/span&gt; 0;
 }
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;While getting xattr, in ext4_xattr_ibody_get():&lt;/p&gt;
&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;        end = (void *)raw_inode + EXT4_SB(inode-&amp;gt;i_sb)-&amp;gt;s_inode_size;
        error = ext4_xattr_check_names(entry, end, entry);
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;For large EA, &lt;tt&gt;value_start + le16_to_cpu(entry-&amp;gt;e_value_offs) + le32_to_cpu(entry-&amp;gt;e_value_size) &amp;gt; end&lt;/tt&gt; will fail, which causes ext4_xattr_check_names() return &quot;-EIO&quot;.&lt;/p&gt;

&lt;p&gt;I fixed the above failure by checking &lt;tt&gt;e_value_inum&lt;/tt&gt; to see whether the large EA value is saved in an external EA inode or not. Testing showed that conf-sanity test 61 passed on RHEL 7.1 distro.&lt;/p&gt;</comment>
                            <comment id="125191" author="gerrit" created="Wed, 26 Aug 2015 15:31:50 +0000"  >&lt;p&gt;Oleg Drokin (oleg.drokin@intel.com) merged in patch &lt;a href=&quot;http://review.whamcloud.com/16012/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://review.whamcloud.com/16012/&lt;/a&gt;&lt;br/&gt;
Subject: &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-6757&quot; title=&quot;conf-sanity test_61: trusted.big different after saving&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-6757&quot;&gt;&lt;del&gt;LU-6757&lt;/del&gt;&lt;/a&gt; ldiskfs: acquire i_mutex lock for ext4_update_i_disksize&lt;br/&gt;
Project: fs/lustre-release&lt;br/&gt;
Branch: master&lt;br/&gt;
Current Patch Set: &lt;br/&gt;
Commit: 7417966b6a2ebf56a49dee327f1561f63bf9224b&lt;/p&gt;</comment>
                            <comment id="125222" author="jgmitter" created="Wed, 26 Aug 2015 17:39:03 +0000"  >&lt;p&gt;Landed for 2.8.&lt;/p&gt;</comment>
                            <comment id="142190" author="gerrit" created="Mon, 15 Feb 2016 00:46:01 +0000"  >&lt;p&gt;Bob Glossman (bob.glossman@intel.com) uploaded a new patch: &lt;a href=&quot;http://review.whamcloud.com/18449&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://review.whamcloud.com/18449&lt;/a&gt;&lt;br/&gt;
Subject: &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-6757&quot; title=&quot;conf-sanity test_61: trusted.big different after saving&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-6757&quot;&gt;&lt;del&gt;LU-6757&lt;/del&gt;&lt;/a&gt; ldiskfs: large EA support&lt;br/&gt;
Project: fs/lustre-release&lt;br/&gt;
Branch: master&lt;br/&gt;
Current Patch Set: 1&lt;br/&gt;
Commit: 813580ebe4a08dddf34eaa057c16832d4be46682&lt;/p&gt;</comment>
                            <comment id="143865" author="gerrit" created="Thu, 25 Feb 2016 22:13:52 +0000"  >&lt;p&gt;Oleg Drokin (oleg.drokin@intel.com) merged in patch &lt;a href=&quot;http://review.whamcloud.com/18449/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://review.whamcloud.com/18449/&lt;/a&gt;&lt;br/&gt;
Subject: &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-6757&quot; title=&quot;conf-sanity test_61: trusted.big different after saving&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-6757&quot;&gt;&lt;del&gt;LU-6757&lt;/del&gt;&lt;/a&gt; ldiskfs: large EA support&lt;br/&gt;
Project: fs/lustre-release&lt;br/&gt;
Branch: master&lt;br/&gt;
Current Patch Set: &lt;br/&gt;
Commit: 721e5ca9b7c1e00dae1d0adc49bcbe403d913a10&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10011">
                    <name>Related</name>
                                            <outwardlinks description="is related to ">
                                                        </outwardlinks>
                                                        </issuelinktype>
                    </issuelinks>
                <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                                                                                                                                                            <customfield id="customfield_10890" key="com.atlassian.jira.plugins.jira-development-integration-plugin:devsummary">
                        <customfieldname>Development</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                        <customfield id="customfield_10390" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hzxgfr:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10090" key="com.pyxis.greenhopper.jira:gh-global-rank">
                        <customfieldname>Rank (Obsolete)</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>9223372036854775807</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                            <customfield id="customfield_10060" key="com.atlassian.jira.plugin.system.customfieldtypes:select">
                        <customfieldname>Severity</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="10022"><![CDATA[3]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                        </customfields>
    </item>
</channel>
</rss>