[LU-7263] object leak in mdt_reint_rename_internal() Created: 07/Oct/15  Updated: 28/Oct/15  Resolved: 28/Oct/15

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

Type: Bug Priority: Critical
Reporter: John Hammond Assignee: John Hammond
Resolution: Fixed Votes: 0
Labels: mdt

Severity: 3
Rank (Obsolete): 9223372036854775807

 Description   

In mdt_reint_rename_internal() if the mnew object is remote then it gets leaked. The last goto label below should be out_put_new:

                if (!fid_is_md_operative(new_fid))
                        GOTO(out_put_old, rc = -EPERM);

                mnew = mdt_object_find(info->mti_env, info->mti_mdt, new_fid);
                if (IS_ERR(mnew))
                        GOTO(out_put_old, rc = PTR_ERR(mnew));

                if (mdt_object_remote(mnew)) {
                        struct mdt_body  *repbody;

                        /* Always send rename req to the target child MDT */
                        repbody = req_capsule_server_get(info->mti_pill,
                                                         &RMF_MDT_BODY);
                        LASSERT(repbody != NULL);
                        repbody->mbo_fid1 = *new_fid;
                        repbody->mbo_valid |= (OBD_MD_FLID | OBD_MD_MDS);
                        GOTO(out_put_old, rc = -EXDEV);
                }

This leak is reachable.



 Comments   
Comment by Joseph Gmitter (Inactive) [ 07/Oct/15 ]

HI Bob,
Can you look at a patch for this?
Thanks.
Joe

Comment by Gerrit Updater [ 07/Oct/15 ]

John L. Hammond (john.hammond@intel.com) uploaded a new patch: http://review.whamcloud.com/16751
Subject: LU-7263 mdt: put mnew in mdt_reint_rename_internal()
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: f3b67b614fc65328676a474f0c08b22822072881

Comment by Joseph Gmitter (Inactive) [ 07/Oct/15 ]

Reassigning to John as the patch is already in progress

Comment by Gerrit Updater [ 28/Oct/15 ]

Oleg Drokin (oleg.drokin@intel.com) merged in patch http://review.whamcloud.com/16751/
Subject: LU-7263 mdt: put mnew in mdt_reint_rename_internal()
Project: fs/lustre-release
Branch: master
Current Patch Set:
Commit: 6fb74fc4b55fc6f661a127d80360235b3239d362

Comment by Joseph Gmitter (Inactive) [ 28/Oct/15 ]

Landed for 2.8

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