[LU-11904] jobid cache cleanup is not safe Created: 30/Jan/19  Updated: 13/May/19

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

Type: Bug Priority: Minor
Reporter: Patrick Farrell (Inactive) Assignee: WC Triage
Resolution: Unresolved Votes: 0
Labels: None

Severity: 3
Rank (Obsolete): 9223372036854775807

 Description   

jobid_cache_fini uses the jobid_hash_lock to protect the jobid_hash pointer:

spin_lock(&jobid_hash_lock);
tmp_hash = jobid_hash;
jobid_hash = NULL;
spin_unlock(&jobid_hash_lock);

But other places in the code use that pointer without holding the jobid_hash_lock (notably jobid_get_from_cache()).

This can cause unexpected behavior in those locations during unmount.

No plan to do a patch for this ATM.



 Comments   
Comment by Patrick Farrell (Inactive) [ 30/Jan/19 ]

One point:
I wonder if we should be allowed to get here while there's still activity on the mount.  If not, then this isn't a bug - just some unnecessary locking.

Comment by Chris Hunter (Inactive) [ 13/May/19 ]

Related to LU-12225 ?

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