From a4a1e480b155a6ac59b71e93f7df4af2f419ed2a Mon Sep 17 00:00:00 2001 From: Vladislav Bolkhovitin Date: Thu, 13 Apr 2017 23:42:51 +0000 Subject: [PATCH] scst: take scst_mutex before calling scst_del_free_acg() in scst_proc_cleanup_module() Take lock before a call that ends up at the lockdep_assert_held() in scst_del_free_acg() without locking. Signed-off-by: David Butterfield git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7118 d57e44dd-8a1f-0410-8b47-8ef2f437770f --- scst/src/scst_proc.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/scst/src/scst_proc.c b/scst/src/scst_proc.c index 199da4726..bf5d3637b 100644 --- a/scst/src/scst_proc.c +++ b/scst/src/scst_proc.c @@ -1213,7 +1213,11 @@ void scst_proc_cleanup_module(void) /* We may not bother about locks here */ scst_proc_cleanup_sgv(); + + mutex_lock(&scst_mutex); scst_proc_cleanup_groups(); + mutex_unlock(&scst_mutex); + scst_proc_cleanup_module_log(); remove_proc_entry(SCST_PROC_THREADS_NAME, scst_proc_scsi_tgt); remove_proc_entry(SCST_PROC_HELP_NAME, scst_proc_scsi_tgt);