[LU-17249] protect scp_rqbd_idle list operations in ptlrpc_service_purge_all() Created: 01/Nov/23  Updated: 09/Nov/23  Resolved: 09/Nov/23

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

Type: Bug Priority: Minor
Reporter: Mikhail Pershin Assignee: Mikhail Pershin
Resolution: Fixed Votes: 0
Labels: None

Issue Links:
Related
Severity: 3
Rank (Obsolete): 9223372036854775807

 Description   

There are evidences that list entry taken from scp_rqbd_idle in ptlrpc_service_purge_all() is used then being freed. From code that entry is taken from the list without any protection, so that is possible place when it is being freed at the same time.

I wasn't able to reproduce that but it seems that is only place where it can happen and solution would be just take the same spinlock svcpt->scp_lock which is used in all other place where these rqbd_list linkage is being used



 Comments   
Comment by Mikhail Pershin [ 01/Nov/23 ]

https://testing.whamcloud.com/test_sets/85afe042-b6a0-4dd1-b6c8-4fa1e15ce20f

https://testing.whamcloud.com/test_sets/cb2e8477-731a-4a66-8241-1c30198b42d5

So far there are two evidences of this issue with crash on attempt to free rqbd entry

Comment by Gerrit Updater [ 01/Nov/23 ]

"Mikhail Pershin <mpershin@whamcloud.com>" uploaded a new patch: https://review.whamcloud.com/c/fs/lustre-release/+/52931
Subject: LU-17249 ptlrpc: protect scp_rqbd_idle list operations
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: 78f739c7fa03c1b3d429c69b39afbcb324302bcc

Comment by Gerrit Updater [ 08/Nov/23 ]

"Oleg Drokin <green@whamcloud.com>" merged in patch https://review.whamcloud.com/c/fs/lustre-release/+/52931/
Subject: LU-17249 ptlrpc: protect scp_rqbd_idle list operations
Project: fs/lustre-release
Branch: master
Current Patch Set:
Commit: 9ba375983d498690f5caa29c289c137470a76505

Comment by Peter Jones [ 09/Nov/23 ]

Landed for 2.16

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