[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: |
|
||||||||||||||||
| 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. |
| Comment by Gerrit Updater [ 24/May/16 ] |
|
Fan Yong (fan.yong@intel.com) uploaded a new patch: http://review.whamcloud.com/20391 |
| Comment by Gerrit Updater [ 14/Jun/16 ] |
|
Oleg Drokin (oleg.drokin@intel.com) merged in patch http://review.whamcloud.com/20391/ |