[LU-8182] Suspicious code in mdt_obd_connect Created: 22/May/16  Updated: 13/Oct/21  Resolved: 14/Jun/16

Status: Resolved
Project: Lustre
Component/s: None
Affects Version/s: None
Fix Version/s: Lustre 2.9.0

Type: Bug Priority: Minor
Reporter: Oleg Drokin Assignee: nasf (Inactive)
Resolution: Fixed Votes: 0
Labels: None

Issue Links:
Duplicate
is duplicated by LU-7944 Suspicious dereference of pointer bef... Resolved
Related
is related to LU-8224 Possibly access of bad pointer in mdt... Resolved
Severity: 3
Rank (Obsolete): 9223372036854775807

 Description   

In mdt_obd_connect() we dereference a "data" pointer and then check if it's not NULL which is strange.

        if ((data->ocd_connect_flags & OBD_CONNECT_MDS_MDS) &&
            !(data->ocd_connect_flags & OBD_CONNECT_LIGHTWEIGHT)) {
                atomic_inc(&mdt->mdt_mds_mds_conns);
                mdt_enable_slc(mdt);
        }

        if (!test_bit(MDT_FL_SYNCED, &mdt->mdt_state) && data != NULL &&


 Comments   
Comment by Joseph Gmitter (Inactive) [ 23/May/16 ]

Hi Fan Yong,

Can you please look at this code?

Thanks.
Joe

Comment by Gerrit Updater [ 24/May/16 ]

Fan Yong (fan.yong@intel.com) uploaded a new patch: http://review.whamcloud.com/20391
Subject: LU-8182 mdt: check connection data properly
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: 07829bb9f84612a398a2d26e47894c9e37bbb20d

Comment by Gerrit Updater [ 14/Jun/16 ]

Oleg Drokin (oleg.drokin@intel.com) merged in patch http://review.whamcloud.com/20391/
Subject: LU-8182 mdt: check connection data properly
Project: fs/lustre-release
Branch: master
Current Patch Set:
Commit: 06072de19cf490f52b9f20dd5a8d9dc8509ceb3f

Generated at Sat Feb 10 02:15:21 UTC 2024 using Jira 9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c.