[LU-13117] Wrong job id parsing in cfs_get_environ() Created: 08/Jan/20  Updated: 25/Feb/20  Resolved: 23/Jan/20

Status: Resolved
Project: Lustre
Component/s: None
Affects Version/s: None
Fix Version/s: Lustre 2.14.0, Lustre 2.12.5

Type: Bug Priority: Minor
Reporter: Wang Shilong (Inactive) Assignee: Wang Shilong (Inactive)
Resolution: Fixed Votes: 0
Labels: None

Issue Links:
Related
Severity: 3
Rank (Obsolete): 9223372036854775807

 Description   

It does the memcmp() to match the environment variable with the desired key, then accounts for the "=" when calculating length. But it fails to check that the next character is actually an equal sign. In the case of any key which is also the prefix to some other variable.



 Comments   
Comment by Gerrit Updater [ 08/Jan/20 ]

Wang Shilong (wshilong@ddn.com) uploaded a new patch: https://review.whamcloud.com/37156
Subject: LU-13117 libcfs: fix to match right key in cfs_get_environ()
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: 58a5ec31602889641c93f29c5c971c2e78d1a1f7

Comment by Gerrit Updater [ 23/Jan/20 ]

Oleg Drokin (green@whamcloud.com) merged in patch https://review.whamcloud.com/37156/
Subject: LU-13117 libcfs: fix to match right key in cfs_get_environ()
Project: fs/lustre-release
Branch: master
Current Patch Set:
Commit: 31170f9ceca91684ea66e0b16757881563a8cf26

Comment by Peter Jones [ 23/Jan/20 ]

Landed for 2.14

Comment by Gerrit Updater [ 02/Feb/20 ]

Wang Shilong (wshilong@ddn.com) uploaded a new patch: https://review.whamcloud.com/37396
Subject: LU-13117 libcfs: fix to match right key in cfs_get_environ()
Project: fs/lustre-release
Branch: b2_12
Current Patch Set: 1
Commit: 6a79e64d708482aa7b4ea83c84292fb7b5244036

Comment by Gerrit Updater [ 25/Feb/20 ]

Oleg Drokin (green@whamcloud.com) merged in patch https://review.whamcloud.com/37396/
Subject: LU-13117 libcfs: fix to match right key in cfs_get_environ()
Project: fs/lustre-release
Branch: b2_12
Current Patch Set:
Commit: a9f62388faa08610e855e6c5a59b853b9f17ccd3

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