[LU-8629] Error exit path doing wrong cleanup in cl_env_percpu_init Created: 20/Sep/16  Updated: 26/Sep/16  Resolved: 26/Sep/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: WC Triage
Resolution: Fixed Votes: 0
Labels: None

Issue Links:
Related
is related to LU-4423 Tracking of patches from upstream ker... Resolved
Severity: 3
Rank (Obsolete): 9223372036854775807

 Description   

Upstream kernel guys found a bug in cl_env_percpu_init:

        if (rc != 0) {
                /* Indices 0 to i (excluding i) were correctly initialized,
                 * thus we must uninitialize up to i, the rest are undefined. */
                for (j = 0; j < i; j++) {
                        cle = &cl_env_percpu[i];
                        lu_context_exit(&cle->ce_ses);
                        lu_context_fini(&cle->ce_ses);
                        lu_env_fini(&cle->ce_lu);
                }
        }

Here clearly cle = &cl_env_percpu[i] should be cle = &cl_env_percpu[j];



 Comments   
Comment by Gerrit Updater [ 20/Sep/16 ]

Oleg Drokin (oleg.drokin@intel.com) uploaded a new patch: http://review.whamcloud.com/22635
Subject: LU-8629 Fix error exit loop in cl_env_percpu_init
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: 7e28f55d06c565624ddb90d4cc569c206a6c9feb

Comment by James A Simmons [ 20/Sep/16 ]

Thanks Oleg for porting this fix.

Comment by Gerrit Updater [ 26/Sep/16 ]

Oleg Drokin (oleg.drokin@intel.com) merged in patch http://review.whamcloud.com/22635/
Subject: LU-8629 obdclass: Fix error exit loop in cl_env_percpu_init
Project: fs/lustre-release
Branch: master
Current Patch Set:
Commit: cf5882e6d381c18ec07d53a38010fcf2eb0d754d

Comment by Peter Jones [ 26/Sep/16 ]

Landed for 2.9

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