Whamcloud - gitweb
LU-11204 obdclass: remove unprotected access to lu_object 60/34960/2
authorMikhail Pershin <mpershin@whamcloud.com>
Sun, 26 May 2019 17:46:43 +0000 (20:46 +0300)
committerOleg Drokin <green@whamcloud.com>
Fri, 7 Jun 2019 04:08:27 +0000 (04:08 +0000)
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

Signed-off-by: Mikhail Pershin <mpershin@whamcloud.com>
Change-Id: I6407cdb079777e60cc0a7aecb64e3a559210b504
Reviewed-on: https://review.whamcloud.com/34960
Tested-by: Jenkins
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Alex Zhuravlev <bzzz@whamcloud.com>
Reviewed-by: Lai Siyao <lai.siyao@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>

No differences found