|
From: <vl...@us...> - 2006-12-12 09:18:06
|
Revision: 45
http://svn.sourceforge.net/scst/?rev=45&view=rev
Author: vlnb
Date: 2006-12-12 01:18:04 -0800 (Tue, 12 Dec 2006)
Log Message:
-----------
Take 2 of fixing the race, which could lead to BUG() in scst_mgmt_thread()
Modified Paths:
--------------
trunk/scst/src/scst_targ.c
Modified: trunk/scst/src/scst_targ.c
===================================================================
--- trunk/scst/src/scst_targ.c 2006-12-05 10:22:53 UTC (rev 44)
+++ trunk/scst/src/scst_targ.c 2006-12-12 09:18:04 UTC (rev 45)
@@ -3861,17 +3861,15 @@
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 (shutting_down) {
+ if (sess->init_phase == SCST_SESS_IPH_INITING) {
+ scst_init_session(sess);
+ } else if (sess->shutting_down) {
BUG_ON(atomic_read(&sess->refcnt) != 0);
scst_free_session_callback(sess);
- } else if (sess->init_phase == SCST_SESS_IPH_INITING) {
- scst_init_session(sess);
} else {
PRINT_ERROR_PR("session %p is in "
"scst_sess_mgmt_list, but in unknown "
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|