<!-- 
RSS generated by JIRA (9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c) at Sat Feb 10 02:41: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-11113] bad destroyed lock logic in __ldlm_handle2lock()</title>
                <link>https://jira.whamcloud.com/browse/LU-11113</link>
                <project id="10000" key="LU">Lustre</project>
                    <description>&lt;p&gt;In &lt;tt&gt;__ldlm_handle2lock()&lt;/tt&gt; the logic around the first check of &lt;tt&gt;ldlm_is_destroyed()&lt;/tt&gt; seems to be reversed after commit d8adb505 (b24336 ldlm_resource::lr_lvb_data is protected by wrong lock). We check &lt;tt&gt;ldlm_is_destroyed()&lt;/tt&gt; before locking the lock and possibly again after:&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;
struct ldlm_lock *__ldlm_handle2lock(&lt;span class=&quot;code-keyword&quot;&gt;const&lt;/span&gt; struct lustre_handle *handle,
                                     __u64 flags)
{
        struct ldlm_lock *lock;
        ENTRY;

        LASSERT(handle);

        lock = class_handle2object(handle-&amp;gt;cookie, NULL);
        &lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; (lock == NULL)
		RETURN(NULL);

        &lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; (lock-&amp;gt;l_export != NULL &amp;amp;&amp;amp; lock-&amp;gt;l_export-&amp;gt;exp_failed) {
                CDEBUG(D_INFO, &lt;span class=&quot;code-quote&quot;&gt;&quot;lock export failed: lock %p, exp %p\n&quot;&lt;/span&gt;,
	               lock, lock-&amp;gt;l_export);
	        LDLM_LOCK_PUT(lock);
                RETURN(NULL);
	}

        /* It&apos;s unlikely but possible that someone marked the lock as                                                            
         * destroyed after we did handle2object on it */
        &lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; ((flags == 0) &amp;amp;&amp;amp; !ldlm_is_destroyed(lock)) {
                lu_ref_add(&amp;amp;lock-&amp;gt;l_reference, &lt;span class=&quot;code-quote&quot;&gt;&quot;handle&quot;&lt;/span&gt;, current);
                RETURN(lock);
        }

        lock_res_and_lock(lock);

	LASSERT(lock-&amp;gt;l_resource != NULL);

        lu_ref_add_atomic(&amp;amp;lock-&amp;gt;l_reference, &lt;span class=&quot;code-quote&quot;&gt;&quot;handle&quot;&lt;/span&gt;, current);
	&lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; (unlikely(ldlm_is_destroyed(lock))) {
                ...
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;But the logic seems to be the opposite of what we would want. It should be:&lt;/p&gt;
&lt;ol&gt;
	&lt;li&gt;If the lock is destroyed then return NULL.&lt;/li&gt;
	&lt;li&gt;Lock the lock.&lt;/li&gt;
	&lt;li&gt;If the lock is destroyed then return NULL.&lt;/li&gt;
	&lt;li&gt;...&lt;/li&gt;
&lt;/ol&gt;
</description>
                <environment></environment>
        <key id="52634">LU-11113</key>
            <summary>bad destroyed lock logic in __ldlm_handle2lock()</summary>
                <type id="1" iconUrl="https://jira.whamcloud.com/secure/viewavatar?size=xsmall&amp;avatarId=11303&amp;avatarType=issuetype">Bug</type>
                                            <priority id="4" iconUrl="https://jira.whamcloud.com/images/icons/priorities/minor.svg">Minor</priority>
                        <status id="1" iconUrl="https://jira.whamcloud.com/images/icons/statuses/open.png" description="The issue is open and ready for the assignee to start work on it.">Open</status>
                    <statusCategory id="2" key="new" colorName="default"/>
                                    <resolution id="-1">Unresolved</resolution>
                                        <assignee username="wc-triage">WC Triage</assignee>
                                    <reporter username="jhammond">John Hammond</reporter>
                        <labels>
                    </labels>
                <created>Tue, 3 Jul 2018 16:41:16 +0000</created>
                <updated>Tue, 3 Jul 2018 16:41:16 +0000</updated>
                                                                                <due></due>
                            <votes>0</votes>
                                    <watches>1</watches>
                                                                                    <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|hzzyq7:</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>