<!-- 
RSS generated by JIRA (9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c) at Sat Feb 10 01:50:30 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-5324] lfsck: possible issue in lfsck_del_target()</title>
                <link>https://jira.whamcloud.com/browse/LU-5324</link>
                <project id="10000" key="LU">Lustre</project>
                    <description>&lt;p&gt;lfsck_del_target() has the following code around line 2648:&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;   2648     list_for_each_entry(ltd, head, ltd_orphan_list) {
   2649         if (ltd-&amp;gt;ltd_tgt == tgt) {
   2650             list_del_init(&amp;amp;ltd-&amp;gt;ltd_orphan_list);
   2651             spin_unlock(&amp;amp;lfsck_instance_lock);
   2652             lfsck_tgt_put(ltd);
   2653 
   2654             return;
   2655         }
   2656     }
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;If the target is not found, the code continues. Note that at that point, the loop cursor ltd is undefined but not NULL.&lt;/p&gt;

&lt;p&gt;A few lines later, we have&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;   2671     if (unlikely(index &amp;gt;= ltds-&amp;gt;ltd_tgts_bitmap-&amp;gt;size))
   2672         goto unlock;
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;If that path is taken, we do:&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;   2685     if (ltd == NULL) {
...
   2697     }
   2698 
   2699     up_write(&amp;amp;ltds-&amp;gt;ltd_rw_sem);
   2700     if (ltd != NULL) {
...
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;But ltd is undefined. So bad things will happen (likely an oops or a memory corruption).&lt;/p&gt;

&lt;p&gt;I think the fix is to either set ltd to NULL, or have a second exit point.&lt;/p&gt;

&lt;p&gt;I don&apos;t have a patch for that.&lt;/p&gt;

</description>
                <environment></environment>
        <key id="25527">LU-5324</key>
            <summary>lfsck: possible issue in lfsck_del_target()</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="yong.fan">nasf</assignee>
                                    <reporter username="fzago">Frank Zago</reporter>
                        <labels>
                    </labels>
                <created>Thu, 10 Jul 2014 18:02:21 +0000</created>
                <updated>Mon, 14 Jul 2014 17:55:55 +0000</updated>
                            <resolved>Mon, 14 Jul 2014 17:55:55 +0000</resolved>
                                    <version>Lustre 2.6.0</version>
                                    <fixVersion>Lustre 2.6.0</fixVersion>
                                        <due></due>
                            <votes>0</votes>
                                    <watches>3</watches>
                                                                            <comments>
                            <comment id="88785" author="yong.fan" created="Thu, 10 Jul 2014 23:09:12 +0000"  >&lt;p&gt;Thanks Frank to catch it! I will make a patch to fix that.&lt;/p&gt;</comment>
                            <comment id="88790" author="yong.fan" created="Fri, 11 Jul 2014 02:27:31 +0000"  >&lt;p&gt;Here is the patch:&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;http://review.whamcloud.com/#/c/11060/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://review.whamcloud.com/#/c/11060/&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="88960" author="jlevi" created="Mon, 14 Jul 2014 17:55:55 +0000"  >&lt;p&gt;Patch landed to b2_6.&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|hzwr4n:</customfieldvalue>

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