Whamcloud - gitweb
LU-1046 ldlm: hold ldlm_cb_set_arg until the last user exit
authorFan Yong <yong.fan@whamcloud.com>
Tue, 31 Jan 2012 05:51:41 +0000 (13:51 +0800)
committerOleg Drokin <green@whamcloud.com>
Thu, 9 Feb 2012 07:47:43 +0000 (02:47 -0500)
commit7d3723d80078c0852b9511523960ba5f4590643c
treed17ba9d0e5a679c343eb77fa7175cba39b44a4bb
parentec20be97b9f977d3f4944523baaffb1bf95cf76c
LU-1046 ldlm: hold ldlm_cb_set_arg until the last user exit

There is race condition between ldlm_cb_interpret() and
ldlm_run_ast_work() when test/release "ldlm_cb_set_arg":
ldlm_run_ast_work() can exit before ldlm_cb_interpret()
processing "ldlm_cb_set_arg::waitq", then causes invalid
memory accessing.

Signed-off-by: Fan Yong <yong.fan@whamcloud.com>
Change-Id: Idfb3f41739e02a79fe4310ecbc7bb842e75a82d8
Reviewed-on: http://review.whamcloud.com/2065
Tested-by: Hudson
Reviewed-by: Jinshan Xiong <jinshan.xiong@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/ldlm/ldlm_internal.h
lustre/ldlm/ldlm_lock.c
lustre/ldlm/ldlm_lockd.c