mirror of
https://github.com/SCST-project/scst.git
synced 2026-05-24 22:21:27 +00:00
scst: add mutex_lock/unlock around scst_alloc_add_acg()
The CONFIG_SCST_PROC build was calling scst_alloc_add_acg() without holding the scst_mutex. Signed-off-by: David Butterfield <dab21774@gmail.com> git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7155 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
@@ -2703,7 +2703,9 @@ static int __init init_scst(void)
|
||||
goto out_sysfs_cleanup;
|
||||
|
||||
#ifdef CONFIG_SCST_PROC
|
||||
mutex_lock(&scst_mutex);
|
||||
res = scst_alloc_add_acg(NULL, SCST_DEFAULT_ACG_NAME, false, &scst_default_acg);
|
||||
mutex_unlock(&scst_mutex);
|
||||
if (res != 0)
|
||||
goto out_destroy_sgv_pool;
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user