[LU-2650] lprocfs_register() racy, returns NULL and ERR_PTR() Created: 18/Jan/13  Updated: 10/Jul/13  Resolved: 10/Jul/13

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

Type: Bug Priority: Minor
Reporter: John Hammond Assignee: John Hammond
Resolution: Fixed Votes: 0
Labels: None

Severity: 3
Rank (Obsolete): 6190

 Description   

lprocfs_register() should acquire _lprocfs_lock() before searching for the entry to be created. If proc_mkdir() returns NULL then this should be changed to ERR_PTR(-ENOMEM) since most callers are only testing against IS_ERR() (if that).

IS_ERR_OR_NULL() should probably be backported if needed for use with the proc wrappers.



 Comments   
Comment by John Hammond [ 24/Jan/13 ]

Please see http://review.whamcloud.com/5161.

Comment by John Hammond [ 10/Jul/13 ]

Patch landed to master.

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