<!-- 
RSS generated by JIRA (9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c) at Sat Feb 10 01:42:57 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-4462] ERR_PTR dereferences in mdt_reconstruct functions</title>
                <link>https://jira.whamcloud.com/browse/LU-4462</link>
                <project id="10000" key="LU">Lustre</project>
                    <description>&lt;p&gt;In some mdt_reconstruct functions we are dereferencing ERR_PTRs. In each case it&apos;s mdt_object_fid(child) after IS_ERR(child) has returned true.&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;HANDLING: lustre/mdt/mdt_open.c
diff =
diff -u -p a/mdt/mdt_open.c b/mdt/mdt_open.c
--- a/mdt/mdt_open.c
+++ b/mdt/mdt_open.c
@@ -1091,7 +1091,7 @@ void mdt_reconstruct_open(struct mdt_thr
                         rc = PTR_ERR(child);
                         LCONSOLE_WARN(&quot;Child &quot;DFID&quot; lookup error %d.&quot;
                                       &quot; Evicting client %s with export %s.\n&quot;,
-                                      PFID(mdt_object_fid(child)), rc,
+                                      PFID(), rc,
                                       obd_uuid2str(&amp;amp;exp-&amp;gt;exp_client_uuid),
                                       obd_export_nid2str(exp));
                         mdt_object_put(env, parent);


diff -u -p a/mdt/mdt_recovery.c b/mdt/mdt_recovery.c
--- a/mdt/mdt_recovery.c
+++ b/mdt/mdt_recovery.c
@@ -255,7 +255,7 @@ static void mdt_reconstruct_create(struc
                 rc = PTR_ERR(child);
                 LCONSOLE_WARN(&quot;Child &quot;DFID&quot; lookup error %d.&quot;
                               &quot; Evicting client %s with export %s.\n&quot;,
-                              PFID(mdt_object_fid(child)), rc,
+                              PFID(), rc,
                               obd_uuid2str(&amp;amp;exp-&amp;gt;exp_client_uuid),
                               obd_export_nid2str(exp));
                 mdt_export_evict(exp);
@@ -301,7 +301,7 @@ static void mdt_reconstruct_setattr(stru
                 int rc = PTR_ERR(obj);
                 LCONSOLE_WARN(&quot;&quot;DFID&quot; lookup error %d.&quot;
                               &quot; Evicting client %s with export %s.\n&quot;,
-                              PFID(mdt_object_fid(obj)), rc,
+                              PFID(), rc,
                               obd_uuid2str(&amp;amp;exp-&amp;gt;exp_client_uuid),
                               obd_export_nid2str(exp));
                 mdt_export_evict(exp);

&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;This was found using the coccinelle script:&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;// this detects cases where a value compared to NULL is subsequently passed
// to PTR_ERR
//
// Confidence: High
// Copyright: (C) Gilles Muller, Julia Lawall, EMN, INRIA, DIKU.  GPLv2.
// URL: http://coccinelle.lip6.fr/rules/ptr.html
// Options:

@@

identifier F !~ &quot;^\(RETURN\|GOTO\|PTR_ERR\|ERR_CAST\)$&quot;;
expression E,E1;
@@

if (IS_ERR(E)) {
        &amp;lt;+... when != E = E1
-       F(...,E,...)
        ...+&amp;gt;
}
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</description>
                <environment></environment>
        <key id="22684">LU-4462</key>
            <summary>ERR_PTR dereferences in mdt_reconstruct functions</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="jhammond">John Hammond</assignee>
                                    <reporter username="jhammond">John Hammond</reporter>
                        <labels>
                            <label>mdt</label>
                    </labels>
                <created>Thu, 9 Jan 2014 18:09:39 +0000</created>
                <updated>Tue, 12 Aug 2014 19:54:31 +0000</updated>
                            <resolved>Wed, 26 Mar 2014 01:27:52 +0000</resolved>
                                    <version>Lustre 2.6.0</version>
                                    <fixVersion>Lustre 2.6.0</fixVersion>
                    <fixVersion>Lustre 2.5.3</fixVersion>
                                        <due></due>
                            <votes>0</votes>
                                    <watches>1</watches>
                                                                            <comments>
                            <comment id="74685" author="jhammond" created="Thu, 9 Jan 2014 19:15:15 +0000"  >&lt;p&gt;Please see &lt;a href=&quot;http://review.whamcloud.com/8788&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://review.whamcloud.com/8788&lt;/a&gt;.&lt;/p&gt;</comment>
                            <comment id="80264" author="jhammond" created="Wed, 26 Mar 2014 01:27:52 +0000"  >&lt;p&gt;Patch landed to master.&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|hzwci7:</customfieldvalue>

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