[LU-17062] Prevent use after free following *_decref_locked() usage Created: 30/Aug/23  Updated: 25/Oct/23  Resolved: 25/Oct/23

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

Type: Bug Priority: Major
Reporter: Shaun Tancheff Assignee: Shaun Tancheff
Resolution: Fixed Votes: 0
Labels: None

Severity: 3
Rank (Obsolete): 9223372036854775807

 Description   

In rare cases when one of:
lnet_peer_net_decref_locked
lnet_peer_decref_locked
lnet_peer_ni_decref_locked
Actually destroys the object it is not safe to use.
Update the functions to return true when the object is deleted and ensure the object is not referenced (used) after it has been kfree()'d.



 Comments   
Comment by Gerrit Updater [ 30/Aug/23 ]

"Shaun Tancheff <shaun.tancheff@hpe.com>" uploaded a new patch: https://review.whamcloud.com/c/fs/lustre-release/+/52184
Subject: LU-17062 lnet: Update lnet_peer_*_decref_locked usage
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: 3d0e75bcd073c52613644830319f99f73b9a3843

Comment by Gerrit Updater [ 25/Oct/23 ]

"Oleg Drokin <green@whamcloud.com>" merged in patch https://review.whamcloud.com/c/fs/lustre-release/+/52184/
Subject: LU-17062 lnet: Update lnet_peer_*_decref_locked usage
Project: fs/lustre-release
Branch: master
Current Patch Set:
Commit: 60cfceb8c59364f786b31ac36c2c245b9a1e495a

Comment by Peter Jones [ 25/Oct/23 ]

Landed for 2.16

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