staging/lustre/ptlrpc: race in pinger (use-after-free situation)
The race is result of use-after-free situation: ~ ptlrpc_stop_pinger() ~ ptlrpc_pinger_main() --------------------------------------------------------------- thread_set_flags(SVC_STOPPING) cfs_waitq_signal(pinger_thread) ... ... thread_set_flags(SVC_STOPPED) l_wait_event(thread_is_stopped) OBD_FREE_PTR(pinger_thread) ... cfs_waitq_signal(pinger_thread) --------------------------------------------------------------- The memory used by pinger_thread might have been freed and reallocated to something else, when ptlrpc_pinger_main() used it in cvs_waitq_signal(). Signed-off-by: NLi Wei <wei.g.li@intel.com> Signed-off-by: NDmitry Eremin <dmitry.eremin@intel.com> Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-3032 Lustre-change: http://review.whamcloud.com/6040Reviewed-by: NFaccini Bruno <bruno.faccini@intel.com> Reviewed-by: NMike Pershin <mike.pershin@intel.com> Reviewed-by: NAndreas Dilger <andreas.dilger@intel.com> Signed-off-by: NPeng Tao <tao.peng@emc.com> Signed-off-by: NAndreas Dilger <andreas.dilger@intel.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Showing
想要评论请 注册 或 登录