<!-- 
RSS generated by JIRA (9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c) at Sat Feb 10 02:30:28 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-9919] unsafe peer access in lnet_select_pathway()</title>
                <link>https://jira.whamcloud.com/browse/LU-9919</link>
                <project id="10000" key="LU">Lustre</project>
                    <description>&lt;p&gt;Looking at the changes to lnet_select_pathway() in &lt;a href=&quot;https://review.whamcloud.com/#/c/25789/24/lnet/lnet/lib-move.c&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://review.whamcloud.com/#/c/25789/24/lnet/lnet/lib-move.c&lt;/a&gt; the accesses to peer appear to be unsafe. In the CDEBUG() peer may be invalid:&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;                lnet_peer_ni_decref_locked(lpni);
                lnet_net_unlock(cpt);

                CDEBUG(D_NET, &lt;span class=&quot;code-quote&quot;&gt;&quot;%s pending discovery\n&quot;&lt;/span&gt;,
                       libcfs_nid2str(peer-&amp;gt;lp_primary_nid));

                &lt;span class=&quot;code-keyword&quot;&gt;return&lt;/span&gt; LNET_DC_WAIT;
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;And similarly after the lpni has been released:&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;        }
        lnet_peer_ni_decref_locked(lpni);

        &lt;span class=&quot;code-comment&quot;&gt;/* If peer is not healthy then can not send anything to it */&lt;/span&gt;
        &lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; (!lnet_is_peer_healthy_locked(peer)) {
                lnet_net_unlock(cpt);
                &lt;span class=&quot;code-keyword&quot;&gt;return&lt;/span&gt; -EHOSTUNREACH;
        }
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</description>
                <environment></environment>
        <key id="47976">LU-9919</key>
            <summary>unsafe peer access in lnet_select_pathway()</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="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="ashehata">Amir Shehata</assignee>
                                    <reporter username="jhammond">John Hammond</reporter>
                        <labels>
                    </labels>
                <created>Fri, 25 Aug 2017 16:23:42 +0000</created>
                <updated>Tue, 6 Feb 2018 05:02:11 +0000</updated>
                            <resolved>Tue, 6 Feb 2018 05:02:11 +0000</resolved>
                                                    <fixVersion>Lustre 2.11.0</fixVersion>
                                        <due></due>
                            <votes>0</votes>
                                    <watches>4</watches>
                                                                            <comments>
                            <comment id="206476" author="ashehata" created="Fri, 25 Aug 2017 22:34:17 +0000"  >&lt;p&gt;These accesses are ok. If you found an lpni that means there is already a refcount on it, because it&apos;s on the list. When you call lnet_nid2peerni_locked() it adds another refcount. So you&apos;d have 1 refcount for it on the list and another refcount because you found it. That latter is what we don&apos;t want to keep. Also because we have the cpt locked, and because we do LOCK_EX whenever we delete or add, then that peer structure tree (peer-&amp;gt;peer_net-&amp;gt;peer_ni) will not be freed while we have the lock. The only time we should worry, is if we drop the lock and regain it again, then another thread can go in there and remove the peer.&lt;/p&gt;</comment>
                            <comment id="206710" author="jhammond" created="Mon, 28 Aug 2017 20:20:57 +0000"  >&lt;p&gt;Are you sure about using peer in the CDEBUG()?&lt;/p&gt;</comment>
                            <comment id="206722" author="gerrit" created="Mon, 28 Aug 2017 22:06:53 +0000"  >&lt;p&gt;Amir Shehata (amir.shehata@intel.com) uploaded a new patch: &lt;a href=&quot;https://review.whamcloud.com/28771&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://review.whamcloud.com/28771&lt;/a&gt;&lt;br/&gt;
Subject: &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-9919&quot; title=&quot;unsafe peer access in lnet_select_pathway()&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-9919&quot;&gt;&lt;del&gt;LU-9919&lt;/del&gt;&lt;/a&gt; lnet: safe access in debug print&lt;br/&gt;
Project: fs/lustre-release&lt;br/&gt;
Branch: master&lt;br/&gt;
Current Patch Set: 1&lt;br/&gt;
Commit: b721c22413cefd878e046ee5b3faf3a46bc996b0&lt;/p&gt;</comment>
                            <comment id="206936" author="jhammond" created="Wed, 30 Aug 2017 14:20:54 +0000"  >&lt;p&gt;There are a few more places in this function where we call lnet_net_unlock(cpt) and then use &lt;tt&gt;best_ni&lt;/tt&gt; or &lt;tt&gt;best_lpni&lt;/tt&gt; in a debug statement. Could you fix those in you change or create a new change?&lt;/p&gt;</comment>
                            <comment id="220058" author="gerrit" created="Tue, 6 Feb 2018 04:27:13 +0000"  >&lt;p&gt;Oleg Drokin (oleg.drokin@intel.com) merged in patch &lt;a href=&quot;https://review.whamcloud.com/28771/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://review.whamcloud.com/28771/&lt;/a&gt;&lt;br/&gt;
Subject: &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-9919&quot; title=&quot;unsafe peer access in lnet_select_pathway()&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-9919&quot;&gt;&lt;del&gt;LU-9919&lt;/del&gt;&lt;/a&gt; lnet: safe access in debug print&lt;br/&gt;
Project: fs/lustre-release&lt;br/&gt;
Branch: master&lt;br/&gt;
Current Patch Set: &lt;br/&gt;
Commit: 7c9ffeac1b69f8cead86307d49c8019f4c51821b&lt;/p&gt;</comment>
                            <comment id="220083" author="pjones" created="Tue, 6 Feb 2018 05:02:11 +0000"  >&lt;p&gt;Landed for 2.11&lt;/p&gt;</comment>
                    </comments>
                    <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|hzzj2n:</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>