Whamcloud - gitweb
LU-11204 obdclass: remove unprotected access to lu_object 17/36217/3
authorMikhail Pershin <mpershin@whamcloud.com>
Sun, 26 May 2019 17:46:43 +0000 (20:46 +0300)
committerOleg Drokin <green@whamcloud.com>
Thu, 21 Nov 2019 07:33:28 +0000 (07:33 +0000)
commite548e31f3feac2831868fe01cc75bf111cf8f501
tree7c6d8bfd6bf2749383dc83f050f8684e65728fe8
parentb2d8a68a697e77023848ea90e78ae426b0d736d1
LU-11204 obdclass: remove unprotected access to lu_object

The check of lu_object_is_dying() is done after reference
drop and without lock, so can access freed object if concurrent
thread did final put.

The patch saves object state right before atomic_dec_and_lock()
and checks it after check, so object is not being accessed

Lustre-change: https://review.whamcloud.com/34960
Lustre-commit: 336cf0f2f3a9ce5b11a34aeaeec062a5d5144213

Signed-off-by: Mikhail Pershin <mpershin@whamcloud.com>
Change-Id: I926991f465e7913e5fc150095425bfb5bf07f57f
Reviewed-on: https://review.whamcloud.com/36217
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/obdclass/lu_object.c