[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: |
|
||||
| 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 |
| Comment by Gerrit Updater [ 17/Sep/21 ] |
|
"Oleg Drokin <green@whamcloud.com>" merged in patch https://review.whamcloud.com/44738/ |
| Comment by Peter Jones [ 17/Sep/21 ] |
|
Landed for 2.15 |