[LU-12693] Memory leak occurs when ldlm_lock_new fails Created: 26/Aug/19  Updated: 26/Aug/19

Status: Open
Project: Lustre
Component/s: None
Affects Version/s: Lustre 2.10.7
Fix Version/s: None

Type: Bug Priority: Minor
Reporter: Tatsushi Takamura Assignee: Tatsushi Takamura
Resolution: Unresolved Votes: 0
Labels: None

Severity: 3
Rank (Obsolete): 9223372036854775807

 Description   

Memory leak occurs when ldlm_lock_new fails in ldlm_lock_create.
The flow is below.

ldlm_lock_create
 res = ldlm_resouce_new
  atomic_set(&res->lr_refcount, 1);
 ldlm_lock_new //if failed
   RETURN(ERR_PTR(-ENOMEM)); // ldlm_resource_putref should be executed

res->lr_refcount remains and the node can not be umount.



 Comments   
Comment by Gerrit Updater [ 26/Aug/19 ]

Tatsushi Takamura (takamr.tatsushi@jp.fujitsu.com) uploaded a new patch: https://review.whamcloud.com/35916
Subject: LU-12693 ldlm: memory leak occurs when ldlm_lock_new fails
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: 99be72e46c27523f4138c39d19d93ff1ff68a1cb

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