[LU-6875] thandle_get_sub_by_dt dereferences ERR_PTR pointer on error Created: 19/Jul/15  Updated: 26/Aug/15  Resolved: 26/Aug/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: Minor
Reporter: Oleg Drokin Assignee: Di Wang
Resolution: Fixed Votes: 0
Labels: None

Severity: 3
Rank (Obsolete): 9223372036854775807

 Description   

thandle_get_sub_by_dt function dereferences PTR_ERR pointer:

                st = create_sub_thandle_with_thandle(top_th,
                                top_th->tt_master_sub_thandle);
                if (IS_ERR(st))
                        GOTO(stop_trans, rc = PTR_ERR(st));
....
stop_trans:
        if (rc < 0) {
                if (st != NULL)
                        OBD_FREE_PTR(st);


 Comments   
Comment by Gerrit Updater [ 23/Jul/15 ]

wangdi (di.wang@intel.com) uploaded a new patch: http://review.whamcloud.com/15691
Subject: LU-6875 update: set st to NULL in error handler
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: 55a0ca4a1bd434ca4c4e6d48847cc432c1d9381c

Comment by Gerrit Updater [ 26/Aug/15 ]

Oleg Drokin (oleg.drokin@intel.com) merged in patch http://review.whamcloud.com/15691/
Subject: LU-6875 update: set st to NULL in error handler
Project: fs/lustre-release
Branch: master
Current Patch Set:
Commit: 861c70ff6e3371c752d53fcb71cdc54fe74cd3c2

Comment by Joseph Gmitter (Inactive) [ 26/Aug/15 ]

Landed for 2.8.

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