<!-- 
RSS generated by JIRA (9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c) at Sat Feb 10 03:30:51 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-16890] allow OBD_FREE() to ignore NULL pointers</title>
                <link>https://jira.whamcloud.com/browse/LU-16890</link>
                <project id="10000" key="LU">Lustre</project>
                    <description>&lt;p&gt;The &lt;tt&gt;OBD_FREE(ptr)&lt;/tt&gt; macro will internally (via &lt;tt&gt;OBD_FREE_PRE()&lt;/tt&gt;) assert that &lt;tt&gt;ptr != NULL&lt;/tt&gt;, even though the kernel accepts &lt;tt&gt;kfree(NULL)&lt;/tt&gt; without complaint.&lt;/p&gt;

&lt;p&gt;It would make sense to remove the &lt;tt&gt;LASSERT(ptr)&lt;/tt&gt; call from &lt;tt&gt;OBD_FREE_PRE()&lt;/tt&gt; and change the callers to silently accept this case:&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;
#define OBD_FREE(ptr, size)                                                  \
&lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; (likely(ptr)) {                                                           \
        OBD_FREE_PRE(ptr, size, &lt;span class=&quot;code-quote&quot;&gt;&quot;kfreed&quot;&lt;/span&gt;);                                   \
        POISON(ptr, 0x5a, size);                                             \
        kfree(ptr);                                                          \
        POISON_PTR(ptr);                                                     \
}

#define OBD_SLAB_FREE(ptr, slab, size) &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160;  &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160;\
&lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; (likely(ptr)) { &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160;  &#160;\
&#160; &#160; &#160; &#160; OBD_FREE_PRE(ptr, size, &lt;span class=&quot;code-quote&quot;&gt;&quot;slab-freed&quot;&lt;/span&gt;); &#160; &#160; &#160; &#160; &#160; &#160; &#160;  &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160;\
&#160; &#160; &#160; &#160; POISON(ptr, 0x5a, size); &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160;  &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160;\
&#160; &#160; &#160; &#160; kmem_cache_free(slab, ptr); &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160;   &#160; &#160; &#160; &#160; &#160; &#160; &#160;\
&#160; &#160; &#160; &#160; POISON_PTR(ptr); &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160;  &#160; &#160; &#160; &#160; &#160; &#160; &#160;\
}
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;It isn&apos;t strictly needed for &lt;tt&gt;OBD_FREE_LARGE()&lt;/tt&gt; since &lt;tt&gt;is_vmalloc_addr(ptr)&lt;/tt&gt; will return false for a NULL pointer and fall back to &lt;tt&gt;OBD_FREE()&lt;/tt&gt;.&lt;/p&gt;</description>
                <environment></environment>
        <key id="76526">LU-16890</key>
            <summary>allow OBD_FREE() to ignore NULL pointers</summary>
                <type id="4" iconUrl="https://jira.whamcloud.com/secure/viewavatar?size=xsmall&amp;avatarId=11310&amp;avatarType=issuetype">Improvement</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="arshad512">Arshad Hussain</assignee>
                                    <reporter username="adilger">Andreas Dilger</reporter>
                        <labels>
                            <label>easy</label>
                    </labels>
                <created>Mon, 12 Jun 2023 20:35:56 +0000</created>
                <updated>Wed, 16 Aug 2023 06:53:23 +0000</updated>
                            <resolved>Sun, 9 Jul 2023 14:32:46 +0000</resolved>
                                                    <fixVersion>Lustre 2.16.0</fixVersion>
                                        <due></due>
                            <votes>0</votes>
                                    <watches>3</watches>
                                                                            <comments>
                            <comment id="375517" author="gerrit" created="Thu, 15 Jun 2023 11:40:33 +0000"  >&lt;p&gt;&quot;Arshad Hussain &amp;lt;arshad.hussain@aeoncomputing.com&amp;gt;&quot; uploaded a new patch: &lt;a href=&quot;https://review.whamcloud.com/c/fs/lustre-release/+/51332&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://review.whamcloud.com/c/fs/lustre-release/+/51332&lt;/a&gt;&lt;br/&gt;
Subject: &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-16890&quot; title=&quot;allow OBD_FREE() to ignore NULL pointers&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-16890&quot;&gt;&lt;del&gt;LU-16890&lt;/del&gt;&lt;/a&gt; obd: OBD_FREE_PRE() to ignore NULL pointers&lt;br/&gt;
Project: fs/lustre-release&lt;br/&gt;
Branch: master&lt;br/&gt;
Current Patch Set: 1&lt;br/&gt;
Commit: 9f42be0e1c77aa1e3914a52854f51ac07ab37f4a&lt;/p&gt;</comment>
                            <comment id="378046" author="gerrit" created="Sat, 8 Jul 2023 22:36:36 +0000"  >&lt;p&gt;&quot;Oleg Drokin &amp;lt;green@whamcloud.com&amp;gt;&quot; merged in patch &lt;a href=&quot;https://review.whamcloud.com/c/fs/lustre-release/+/51332/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://review.whamcloud.com/c/fs/lustre-release/+/51332/&lt;/a&gt;&lt;br/&gt;
Subject: &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-16890&quot; title=&quot;allow OBD_FREE() to ignore NULL pointers&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-16890&quot;&gt;&lt;del&gt;LU-16890&lt;/del&gt;&lt;/a&gt; obd: OBD_FREE_PRE() to ignore NULL pointers&lt;br/&gt;
Project: fs/lustre-release&lt;br/&gt;
Branch: master&lt;br/&gt;
Current Patch Set: &lt;br/&gt;
Commit: 46a9abf4330e7a12fde41fb922d6dfc4547c6243&lt;/p&gt;</comment>
                            <comment id="378075" author="pjones" created="Sun, 9 Jul 2023 14:32:46 +0000"  >&lt;p&gt;Landed for 2.16&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10011">
                    <name>Related</name>
                                                                <inwardlinks description="is related to">
                                        <issuelink>
            <issuekey id="75359">LU-16688</issuekey>
        </issuelink>
                            </inwardlinks>
                                    </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|i03ns7:</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>