[LU-6872] Infinite loop in lsm_alloc_plain on error cleanup Created: 18/Jul/15  Updated: 26/Jul/15  Resolved: 26/Jul/15

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

Type: Bug Priority: Minor
Reporter: Oleg Drokin Assignee: John Hammond
Resolution: Fixed Votes: 0
Labels: patch

Severity: 3
Rank (Obsolete): 9223372036854775807

 Description   

A recent lov cleanup (patch 5ccd7a4a556b1a847eb5bff8b2395522a6f4bca8 http://review.whamcloud.com/13722 by John Hammond) has introduced an infinite loop in lsm_alloc_plain by changing type of variable 'i' from signed to unsigned:

struct lov_stripe_md *lsm_alloc_plain(u16 stripe_count)
{
...
        unsigned int i;
...
err:
        while (--i >= 0)
                OBD_SLAB_FREE(lsm->lsm_oinfo[i], lov_oinfo_slab, sizeof(*loi));

Now the while loop is infinite.



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

John L. Hammond (john.hammond@intel.com) uploaded a new patch: http://review.whamcloud.com/15644
Subject: LU-6872 lov: avoid infinite loop in lsm_alloc_plain()
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: a1a24a57e3ca127e43fed07cf9b75e3def89efc5

Comment by Gerrit Updater [ 26/Jul/15 ]

Oleg Drokin (oleg.drokin@intel.com) merged in patch http://review.whamcloud.com/15644/
Subject: LU-6872 lov: avoid infinite loop in lsm_alloc_plain()
Project: fs/lustre-release
Branch: master
Current Patch Set:
Commit: 6af80537ef30987b37f038588a3e927151a7b6f5

Comment by Peter Jones [ 26/Jul/15 ]

Landed for 2.8

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