- Fixed a race, which could lead to BUG() in scst_mgmt_thread()

- Credits updated


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@44 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
Vladislav Bolkhovitin
2006-12-05 10:22:53 +00:00
parent de3801ce0b
commit 19061ed988
2 changed files with 5 additions and 1 deletions
+2
View File
@@ -486,4 +486,6 @@ Thanks to:
* Calvin Morrow <calvin.morrow@comcast.net> for testing and usful
suggestions.
* Erik Habbinga <erikhabbinga@inphase-tech.com> for fixes.
Vladislav Bolkhovitin <vst@vlnb.net>, http://scst.sourceforge.net
+3 -1
View File
@@ -3861,11 +3861,13 @@ restart:
list_for_each_entry(sess, &scst_sess_mgmt_list,
sess_mgmt_list_entry)
{
int shutting_down;
TRACE_DBG("Removing sess %p from scst_sess_mgmt_list",
sess);
list_del(&sess->sess_mgmt_list_entry);
shutting_down = sess->shutting_down;
spin_unlock_irq(&scst_mgmt_lock);
if (sess->shutting_down) {
if (shutting_down) {
BUG_ON(atomic_read(&sess->refcnt) != 0);
scst_free_session_callback(sess);
} else if (sess->init_phase == SCST_SESS_IPH_INITING) {