Whamcloud - gitweb
LU-17625 statahead: avoid to use @sai after its has been freed 26/54826/3
authorQian Yingjin <qian@ddn.com>
Wed, 17 Apr 2024 08:22:02 +0000 (04:22 -0400)
committerOleg Drokin <green@whamcloud.com>
Tue, 21 May 2024 18:25:05 +0000 (18:25 +0000)
commit85fe3cfff866083db8e9b1d72fc7f07e123b6f4c
tree07feeaa25b32a75d3687638ced1f2c667b5936a2
parentce17f1cc9c2372cc79ab2d99230e78409e644414
LU-17625 statahead: avoid to use @sai after its has been freed

There is a race between a statahead thread startup and another
statahead reqeust trying to access the same statahead structure.
But the statahead thread startup was failed and free the statahead
structure too earlier. The user stat() request will use the
statahead structure which memory has been freed already wrongly...

In this patch, we repace the @ll_sai_free/@ll_sax_free with
@ll_sai_put/@ll_sax_put to avoid freeing the statahead structure
too eariler when they were still being used by user stat()
request.

Signed-off-by: Qian Yingjin <qian@ddn.com>
Change-Id: I3840be959160aed2887a91be81da05f796306cd9
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/54826
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Lai Siyao <lai.siyao@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/llite/statahead.c