<!-- 
RSS generated by JIRA (9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c) at Sat Feb 10 01:57:46 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-6158] always shrink_capsule in mdt_getxattr_all</title>
                <link>https://jira.whamcloud.com/browse/LU-6158</link>
                <project id="10000" key="LU">Lustre</project>
                    <description>&lt;p&gt;When mdt_getxattr_one returns error, capsule should be&lt;br/&gt;
shrunk to zero before exit in mdt_getxattr_all. Otherwise reply may include rubbish and could be bigger  1 MB.&lt;/p&gt;

&lt;p&gt;In seagate we faced a kernel panic caused this issue. Panic occurred in o2iblnd because reply size was &amp;gt; 1 MB.&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;[260641.975629] BUG: unable to handle kernel NULL pointer dereference at (null)
[260641.983967] IP: [&amp;lt;ffffffff81291d32&amp;gt;] sg_next+0x2/0x30
[260641.990153] PGD 0 
[260641.992912] Oops: 0000 [#1] SMP 
[260641.997062] last sysfs file: /sys/devices/pci0000:00/0000:00:01.0/0000:01:00.0/irq
[260642.006436] CPU 14 
[260642.008694] Modules linked in: ost(U) mgs(U) osc(U) lmv(U) ksocklnd(U) osp(U) mdd(U) lfsck(U) lod(U) mdt(U) mgc(U) osd_ldiskfs(U) lquota(U) ldiskfs(U) linear raid10 raid456 asyn
c_raid6_recov async_pq raid6_pq async_xor xor async_memcpy async_tx lustre(U) lov(U) mdc(U) fid(U) fld(U) ko2iblnd(U) ptlrpc(U) obdclass(U) lnet(U) sha512_generic sha256_generic crc
32c_intel libcfs(U) ext4 jbd2 mbcache ib_ipoib(U) rdma_ucm(U) ib_ucm(U) ib_uverbs(U) ib_umad(U) rdma_cm(U) ib_cm(U) iw_cm(U) mlx4_ib(U) ib_sa(U) ib_mad(U) ib_core(U) ib_addr(U) nf_c
onntrack_ipv4 nf_defrag_ipv4 xt_state xt_multiport iptable_filter xt_NOTRACK nf_conntrack iptable_raw ip_tables ipmi_devintf cpufreq_ondemand acpi_cpufreq freq_table mperf dm_mod sg
 ses enclosure sd_mod crc_t10dif wmi iTCO_wdt iTCO_vendor_support isci libsas mpt2sas scsi_transport_sas raid_class i2c_i801 lpc_ich mfd_core ahci shpchp nfs lockd fscache auth_rpcg
ss nfs_acl sunrpc igb dca i2c_algo_bit i2c_core mlx4_en(U) ptp pps_core mlx4_core(U) compat(U) bonding ipv6 8021q garp stp llc [last unloaded: ib_core]
[260642.130255] 
[260642.132423] Pid: 139276, comm: mdt02_000 Not tainted 2.6.32-431.17.1.x2.0.43.x86_64 #1 Intel Corporation S2600JF/S2600JF
[260642.145551] RIP: 0010:[&amp;lt;ffffffff81291d32&amp;gt;]  [&amp;lt;ffffffff81291d32&amp;gt;] sg_next+0x2/0x30
[260642.154849] RSP: 0018:ffff8807af5dd908  EFLAGS: 00010246
[260642.161295] RAX: 0000000000000000 RBX: ffff88101247d000 RCX: 0000000000000000
[260642.170181] RDX: 0000000000000101 RSI: ffffc900191805d8 RDI: 0000000000000000
[260642.179064] RBP: ffff8807af5dd980 R08: ffffea002b4d8108 R09: 0000000000000301
[260642.187950] R10: 0000000000001000 R11: 0000000000000000 R12: ffff88083001dec0
[260642.196835] R13: ffff881012476000 R14: ffffc900191805d8 R15: ffff8810336bb090
[260642.205721] FS:  0000000000000000(0000) GS:ffff88085c480000(0000) knlGS:0000000000000000
[260642.215676] CS:  0010 DS: 0018 ES: 0018 CR0: 000000008005003b
[260642.222610] CR2: 0000000000000000 CR3: 0000000001a85000 CR4: 00000000001407e0
[260642.231490] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
[260642.240379] DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
[260642.249266] Process mdt02_000 (pid: 139276, threadinfo ffff8807af5dc000, task ffff880833576ae0)
[260642.259909] Stack:
[260642.262653]  ffffffffa0a6a2fe 0000000000000010 0000000000000000 ffff880700000101
[260642.271283] &amp;lt;d&amp;gt; ffffffff81a98ec0 ffff880832e45dc0 0000030100000001 ffffffffffffffff
[260642.280841] &amp;lt;d&amp;gt; 0000000affffffff ffffffffffffffff ffff8808216852c0 ffffc900191805d8
[260642.291006] Call Trace:
[260642.294269]  [&amp;lt;ffffffffa0a6a2fe&amp;gt;] ? kiblnd_map_tx+0x19e/0x540 [ko2iblnd]
[260642.302285]  [&amp;lt;ffffffffa0a6ab6a&amp;gt;] kiblnd_setup_rd_iov+0x13a/0x2b0 [ko2iblnd]
[260642.310691]  [&amp;lt;ffffffffa0a7029a&amp;gt;] kiblnd_send+0x5da/0x9b0 [ko2iblnd]
[260642.318374]  [&amp;lt;ffffffffa03faedb&amp;gt;] lnet_ni_send+0x4b/0xf0 [lnet]
[260642.325522]  [&amp;lt;ffffffffa03ff046&amp;gt;] lnet_send+0x656/0xb60 [lnet]
[260642.332566]  [&amp;lt;ffffffffa040006a&amp;gt;] LNetPut+0x30a/0x850 [lnet]
[260642.339507]  [&amp;lt;ffffffffa086f160&amp;gt;] ptl_send_buf+0x1e0/0x550 [ptlrpc]
[260642.347103]  [&amp;lt;ffffffffa088f3e8&amp;gt;] ? at_measured+0x108/0x380 [ptlrpc]
[260642.354800]  [&amp;lt;ffffffffa08b13d5&amp;gt;] ? null_authorize+0x75/0x100 [ptlrpc]
[260642.362674]  [&amp;lt;ffffffffa086f74b&amp;gt;] ptlrpc_send_reply+0x27b/0x7f0 [ptlrpc]
[260642.370736]  [&amp;lt;ffffffffa0838784&amp;gt;] target_send_reply_msg+0x54/0x190 [ptlrpc]
[260642.379086]  [&amp;lt;ffffffffa0838ca6&amp;gt;] target_send_reply+0x3e6/0x720 [ptlrpc]
[260642.387158]  [&amp;lt;ffffffffa087604c&amp;gt;] ? lustre_msg_set_last_committed+0x6c/0xc0 [ptlrpc]
[260642.396803]  [&amp;lt;ffffffffa08d8370&amp;gt;] tgt_request_handle+0x2c0/0xac0 [ptlrpc]
[260642.404972]  [&amp;lt;ffffffffa0887e6a&amp;gt;] ptlrpc_main+0xd1a/0x1960 [ptlrpc]
[260642.412551]  [&amp;lt;ffffffffa0887150&amp;gt;] ? ptlrpc_main+0x0/0x1960 [ptlrpc]
[260642.420074]  [&amp;lt;ffffffff8109ac66&amp;gt;] kthread+0x96/0xa0
[260642.426040]  [&amp;lt;ffffffff8100c20a&amp;gt;] child_rip+0xa/0x20
[260642.432099]  [&amp;lt;ffffffff8109abd0&amp;gt;] ? kthread+0x0/0xa0
[260642.438158]  [&amp;lt;ffffffff8100c200&amp;gt;] ? child_rip+0x0/0x20
[260642.444411] Code: 5c 41 5d 41 5e 41 5f c9 c3 55 48 c7 c2 c0 22 29 81 be 80 00 00 00 48 89 e5 e8 6b ff ff ff c9 c3 66 0f 1f 84 00 00 00 00 00 31 c0 &amp;lt;f6&amp;gt; 07 02 55 48 89 e5 75 0d 48 8b 57 20 48 8d 47 20 f6 c2 01 75 
[260642.468112] RIP  [&amp;lt;ffffffff81291d32&amp;gt;] sg_next+0x2/0x30
[260642.474390]  RSP &amp;lt;ffff8807af5dd908&amp;gt;
[260642.478781] CR2: 0000000000000000&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</description>
                <environment></environment>
        <key id="28373">LU-6158</key>
            <summary>always shrink_capsule in mdt_getxattr_all</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="laisiyao">Lai Siyao</assignee>
                                    <reporter username="scherementsev">Sergey Cheremencev</reporter>
                        <labels>
                            <label>patch</label>
                    </labels>
                <created>Mon, 26 Jan 2015 16:51:05 +0000</created>
                <updated>Sat, 16 Jan 2016 06:03:07 +0000</updated>
                            <resolved>Mon, 31 Aug 2015 13:00:23 +0000</resolved>
                                                    <fixVersion>Lustre 2.8.0</fixVersion>
                                        <due></due>
                            <votes>0</votes>
                                    <watches>12</watches>
                                                                            <comments>
                            <comment id="104702" author="gerrit" created="Mon, 26 Jan 2015 17:02:33 +0000"  >&lt;p&gt;Sergey Cheremencev (sergey_cheremencev@xyratex.com) uploaded a new patch: &lt;a href=&quot;http://review.whamcloud.com/13524&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://review.whamcloud.com/13524&lt;/a&gt;&lt;br/&gt;
Subject: &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-6158&quot; title=&quot;always shrink_capsule in mdt_getxattr_all&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-6158&quot;&gt;&lt;del&gt;LU-6158&lt;/del&gt;&lt;/a&gt; mdt: always shrink_capsule in getxattr_all&lt;br/&gt;
Project: fs/lustre-release&lt;br/&gt;
Branch: master&lt;br/&gt;
Current Patch Set: 1&lt;br/&gt;
Commit: 61c93a95e7706d59c8d34e7e713ac185c883caf9&lt;/p&gt;</comment>
                            <comment id="104703" author="sergey" created="Mon, 26 Jan 2015 17:03:49 +0000"  >&lt;p&gt;Patch that helped in seagate &lt;a href=&quot;http://review.whamcloud.com/13524&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://review.whamcloud.com/13524&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="120292" author="pjones" created="Fri, 3 Jul 2015 17:34:30 +0000"  >&lt;p&gt;Lai&lt;/p&gt;

&lt;p&gt;Could you please review this patch?&lt;/p&gt;

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

&lt;p&gt;Peter&lt;/p&gt;</comment>
                            <comment id="124383" author="bruno.travouillon" created="Tue, 18 Aug 2015 10:05:19 +0000"  >&lt;p&gt;Should&apos;nt we shrink the capsule when &lt;tt&gt;mdt_getxattr_one&lt;/tt&gt; is called by &lt;tt&gt;mdt_getxattr&lt;/tt&gt; and returns an error?&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;220 &lt;span class=&quot;code-object&quot;&gt;int&lt;/span&gt; mdt_getxattr(struct mdt_thread_info *info)
221 {
[...]
282     &lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; (valid == OBD_MD_FLXATTR) {
283         &lt;span class=&quot;code-object&quot;&gt;char&lt;/span&gt; *xattr_name = req_capsule_client_get(info-&amp;gt;mti_pill,
284                               &amp;amp;RMF_NAME);
285         rc = mdt_getxattr_one(info, xattr_name, next, buf, med, uc);
286     } &lt;span class=&quot;code-keyword&quot;&gt;else&lt;/span&gt; &lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; (valid == OBD_MD_FLXATTRLS) {
[...]
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</comment>
                            <comment id="124796" author="sergey" created="Fri, 21 Aug 2015 15:52:46 +0000"  >&lt;blockquote&gt;&lt;p&gt;Should&apos;nt we shrink the capsule when mdt_getxattr_one is called by mdt_getxattr and returns an error?&lt;/p&gt;&lt;/blockquote&gt;

&lt;p&gt;I am not sure it is reasonable here.&lt;br/&gt;
We get the easize in mdt_getxattr_pack_reply(calling mo_xattr_get and mo_xattr_list):&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;       if (valid == OBD_MD_FLXATTR) {
                xattr_name = req_capsule_client_get(pill, &amp;amp;RMF_NAME);
                if (!xattr_name)
                        RETURN(-EFAULT);

                if (!(exp_connect_flags(req-&amp;gt;rq_export) &amp;amp; OBD_CONNECT_XATTR) &amp;amp;&amp;amp;
                    !strncmp(xattr_name, user_string, sizeof(user_string) - 1)) 
                        RETURN(-EOPNOTSUPP);

                size = mo_xattr_get(info-&amp;gt;mti_env,
                                    mdt_object_child(info-&amp;gt;mti_object),
                                    &amp;amp;LU_BUF_NULL, xattr_name);
        } else if (valid == OBD_MD_FLXATTRLS) {
                size = mo_xattr_list(info-&amp;gt;mti_env,
                                     mdt_object_child(info-&amp;gt;mti_object),
                                     &amp;amp;LU_BUF_NULL);
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;Exception is only XATTRALL:&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;        } else if (valid == OBD_MD_FLXATTRALL) {
                /* N.B. eadatasize = 0 is not valid for FLXATTRALL */
                /* We could calculate accurate sizes, but this would
                 * introduce a lot of overhead, let&apos;s do it later... */
                size = info-&amp;gt;mti_body-&amp;gt;mbo_eadatasize;
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;Thus we need to shrink the capsule inside of mdt_getxattr_all.&lt;/p&gt;</comment>
                            <comment id="124862" author="laisiyao" created="Mon, 24 Aug 2015 03:21:27 +0000"  >&lt;p&gt;hmm, easize is always correctly set before calling mdt_getxattr_one(), so it&apos;s not necessary to shrink capsule upon failure.&lt;/p&gt;</comment>
                            <comment id="125336" author="bruno.travouillon" created="Thu, 27 Aug 2015 06:39:48 +0000"  >&lt;p&gt;Indeed, you&apos;re right.&lt;/p&gt;

&lt;p&gt;Is the patch ready to merge?&lt;/p&gt;</comment>
                            <comment id="125501" author="laisiyao" created="Fri, 28 Aug 2015 09:43:34 +0000"  >&lt;p&gt;yes, it&apos;s on the landing list.&lt;/p&gt;</comment>
                            <comment id="125602" author="gerrit" created="Sat, 29 Aug 2015 01:03:14 +0000"  >&lt;p&gt;Oleg Drokin (oleg.drokin@intel.com) merged in patch &lt;a href=&quot;http://review.whamcloud.com/13524/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://review.whamcloud.com/13524/&lt;/a&gt;&lt;br/&gt;
Subject: &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-6158&quot; title=&quot;always shrink_capsule in mdt_getxattr_all&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-6158&quot;&gt;&lt;del&gt;LU-6158&lt;/del&gt;&lt;/a&gt; mdt: always shrink_capsule in getxattr_all&lt;br/&gt;
Project: fs/lustre-release&lt;br/&gt;
Branch: master&lt;br/&gt;
Current Patch Set: &lt;br/&gt;
Commit: b046468f58a1f40e85cb59ed9abf75fd2fd5ea5a&lt;/p&gt;</comment>
                            <comment id="125667" author="jgmitter" created="Mon, 31 Aug 2015 13:00:23 +0000"  >&lt;p&gt;Landed for 2.8.&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10010">
                    <name>Duplicate</name>
                                                                <inwardlinks description="is duplicated by">
                                        <issuelink>
            <issuekey id="30922">LU-6799</issuekey>
        </issuelink>
                            </inwardlinks>
                                    </issuelinktype>
                            <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|hzx4vb:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10090" key="com.pyxis.greenhopper.jira:gh-global-rank">
                        <customfieldname>Rank (Obsolete)</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>17222</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>