Whamcloud - gitweb
LU-18483 ldlm: serialize parallel lock res change requests 10/57110/2
authorAndrew Perepechko <andrew.perepechko@hpe.com>
Fri, 22 Nov 2024 17:05:36 +0000 (20:05 +0300)
committerOleg Drokin <green@whamcloud.com>
Thu, 2 Jan 2025 20:42:10 +0000 (20:42 +0000)
commit92b34022d51c7cf33bf244db7684fefe18a87429
tree9f627c2b7bb8af73b13aaa36ad86b8dc88d656a3
parent97b5c1cd5a2029981f08e2181f3a0b56c6291102
LU-18483 ldlm: serialize parallel lock res change requests

If parallel ldlm_lock_change_resource() calls race in a certain
way, the old resource can be released multiple times leading to
memory corruption.

The fix detects such race condtions after locking and restarts
the replace procedure if needed.

Change-Id: I742a8dde0ab4c63517c02c2e8e1bdfe402b331b4
Signed-off-by: Andrew Perepechko <andrew.perepechko@hpe.com>
HPE-bug-id: LUS-12212
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/57110
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Alexander Zarochentsev <alexander.zarochentsev@hpe.com>
Reviewed-by: Yang Sheng <ys@whamcloud.com>
Reviewed-by: Patrick Farrell <pfarrell@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/ldlm/ldlm_lock.c