<!-- 
RSS generated by JIRA (9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c) at Sat Feb 10 01:50:03 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-5274] ll_statahead_thread() may leak parent, uses parent after dput</title>
                <link>https://jira.whamcloud.com/browse/LU-5274</link>
                <project id="10000" key="LU">Lustre</project>
                    <description>&lt;p&gt;In ll_statahead_thread() if ll_prep_md_op_data() returns an error then the parent dentry will be leaked and the parent thread will hang in do_statahead_enter().&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;&lt;span class=&quot;code-keyword&quot;&gt;static&lt;/span&gt; &lt;span class=&quot;code-object&quot;&gt;int&lt;/span&gt; ll_statahead_thread(void *arg)
{
        struct dentry            *parent = (struct dentry *)arg;

        ...

        thread-&amp;gt;t_pid = current_pid();
        CDEBUG(D_READA, &lt;span class=&quot;code-quote&quot;&gt;&quot;statahead thread starting: sai %p, parent %.*s\n&quot;&lt;/span&gt;,
               sai, parent-&amp;gt;d_name.len, parent-&amp;gt;d_name.name);

        op_data = ll_prep_md_op_data(NULL, dir, dir, NULL, 0, 0,
                                     LUSTRE_OPC_ANY, dir);
        &lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; (IS_ERR(op_data))
                RETURN(PTR_ERR(op_data));

        ...

        spin_lock(&amp;amp;plli-&amp;gt;lli_sa_lock);
        &lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; (thread_is_init(thread))
                /* If someone &lt;span class=&quot;code-keyword&quot;&gt;else&lt;/span&gt; has changed the thread state
                 * (e.g. already changed to SVC_STOPPING), we can&apos;t just
                 * blindly overwrite that setting. */
                thread_set_flags(thread, SVC_RUNNING);
        spin_unlock(&amp;amp;plli-&amp;gt;lli_sa_lock);
        wake_up(&amp;amp;thread-&amp;gt;t_ctl_waitq);
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;At the end of the same function parent is passed to CDEBUG() after dput():&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;        dput(parent);
        CDEBUG(D_READA, &lt;span class=&quot;code-quote&quot;&gt;&quot;statahead thread stopped: sai %p, parent %.*s\n&quot;&lt;/span&gt;,
               sai, parent-&amp;gt;d_name.len, parent-&amp;gt;d_name.name);
        &lt;span class=&quot;code-keyword&quot;&gt;return&lt;/span&gt; rc;
}
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</description>
                <environment></environment>
        <key id="25376">LU-5274</key>
            <summary>ll_statahead_thread() may leak parent, uses parent after dput</summary>
                <type id="1" iconUrl="https://jira.whamcloud.com/secure/viewavatar?size=xsmall&amp;avatarId=11303&amp;avatarType=issuetype">Bug</type>
                                            <priority id="3" iconUrl="https://jira.whamcloud.com/images/icons/priorities/major.svg">Major</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="bobijam">Zhenyu Xu</assignee>
                                    <reporter username="jhammond">John Hammond</reporter>
                        <labels>
                            <label>malloc</label>
                            <label>patch</label>
                            <label>statahead</label>
                    </labels>
                <created>Mon, 30 Jun 2014 17:57:49 +0000</created>
                <updated>Thu, 14 Jun 2018 21:41:37 +0000</updated>
                            <resolved>Thu, 14 Aug 2014 18:34:00 +0000</resolved>
                                    <version>Lustre 2.6.0</version>
                                    <fixVersion>Lustre 2.7.0</fixVersion>
                                        <due></due>
                            <votes>0</votes>
                                    <watches>7</watches>
                                                                            <comments>
                            <comment id="87990" author="adilger" created="Wed, 2 Jul 2014 17:35:59 +0000"  >&lt;p&gt;The patch &lt;a href=&quot;http://review.whamcloud.com/10940&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://review.whamcloud.com/10940&lt;/a&gt; fixes one of the two problems described here.&lt;/p&gt;</comment>
                            <comment id="88813" author="pjones" created="Fri, 11 Jul 2014 11:26:11 +0000"  >&lt;p&gt;Bobijam&lt;/p&gt;

&lt;p&gt;Could you please review the patch from Li Xi and see whether the autotest failures are related to the changes or not?&lt;/p&gt;

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

&lt;p&gt;Peter&lt;/p&gt;</comment>
                            <comment id="88815" author="bobijam" created="Fri, 11 Jul 2014 11:59:21 +0000"  >&lt;p&gt;no, it&apos;s not related to the patch change itself, sanity-quota 7c test error is reported  in &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-4448&quot; title=&quot;Test failure timeout on sanity-quota test_7c: client sysrq and reboot&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-4448&quot;&gt;LU-4448&lt;/a&gt;, &lt;/p&gt;</comment>
                            <comment id="90545" author="jhammond" created="Thu, 31 Jul 2014 15:21:20 +0000"  >&lt;p&gt;The updated version of &lt;a href=&quot;http://review.whamcloud.com/10940&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://review.whamcloud.com/10940&lt;/a&gt; has landed to master and addressed both issues.&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10011">
                    <name>Related</name>
                                            <outwardlinks description="is related to ">
                                        <issuelink>
            <issuekey id="24738">LU-5071</issuekey>
        </issuelink>
                            </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|hzwq8v:</customfieldvalue>

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