[LU-14959] Users of ldlm_resource_get much check return value Created: 24/Aug/21  Updated: 17/Jan/23  Resolved: 17/Sep/21

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

Type: Bug Priority: Major
Reporter: Oleg Drokin Assignee: Oleg Drokin
Resolution: Fixed Votes: 0
Labels: None

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

 Description   

osc_req_attr_set() and mdc_get_lock_handle() use result from ldlm_resource_get() without checking it's not IS_ERR() resulting in a NULL pointer dereference crash in ldlm_resource_dump()

It's less critical in osc_req_attr_set where the branch culminates in LBUG anyway, but mdc_get_lock_handle seems to be a real unintended crash.

Both cases seem to be worth fixing and also comment for ldlm_resource_get is incorrect since it no longer returns NULL for the error



 Comments   
Comment by Gerrit Updater [ 24/Aug/21 ]

"Oleg Drokin <green@whamcloud.com>" uploaded a new patch: https://review.whamcloud.com/44738
Subject: LU-14959 ldlm: Check return value of ldlm_resource_get()
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: ceff95c35c5a835e05250844ed9a8b495c90c440

Comment by Gerrit Updater [ 17/Sep/21 ]

"Oleg Drokin <green@whamcloud.com>" merged in patch https://review.whamcloud.com/44738/
Subject: LU-14959 ldlm: Check return value of ldlm_resource_get()
Project: fs/lustre-release
Branch: master
Current Patch Set:
Commit: 3e0aa9ca6e0a9a6981b9a3ad5f556cd6554a6b5b

Comment by Peter Jones [ 17/Sep/21 ]

Landed for 2.15

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