|
From: <bva...@us...> - 2015-01-15 08:58:49
|
Revision: 5968
http://sourceforge.net/p/scst/svn/5968
Author: bvassche
Date: 2015-01-15 08:58:39 +0000 (Thu, 15 Jan 2015)
Log Message:
-----------
scst_targ: Avoid triggering a kernel panic if dev_user_parse() returns SCST_CMD_STATE_STOP
Reported-by: Ilan Steinberg <ila...@ka...>
Modified Paths:
--------------
trunk/scst/src/scst_targ.c
Modified: trunk/scst/src/scst_targ.c
===================================================================
--- trunk/scst/src/scst_targ.c 2015-01-14 08:06:12 UTC (rev 5967)
+++ trunk/scst/src/scst_targ.c 2015-01-15 08:58:39 UTC (rev 5968)
@@ -635,7 +635,7 @@
TRACE_MGMT_DBG("Dev handler %s parse() needs thread "
"context, rescheduling", devt->name);
res = SCST_CMD_STATE_RES_NEED_THREAD;
- goto out;
+ goto check_compl;
}
TRACE_DBG("Calling dev handler %s parse(%p)",
@@ -939,11 +939,11 @@
TRACE_DBG_FLAG(TRACE_DEBUG|TRACE_MINOR, "Atomic context and "
"non-WRITE data direction, rescheduling (cmd %p)", cmd);
res = SCST_CMD_STATE_RES_NEED_THREAD;
- goto out;
+ goto check_compl;
}
#endif
-out:
+check_compl:
#ifdef CONFIG_SCST_EXTRACHECKS
if (unlikely(cmd->completed)) {
/* Command completed with error */
@@ -1000,6 +1000,7 @@
}
}
+out:
TRACE_EXIT_HRES(res);
return res;
@@ -1010,7 +1011,7 @@
out_done:
scst_set_cmd_abnormal_done_state(cmd);
res = SCST_CMD_STATE_RES_CONT_SAME;
- goto out;
+ goto check_compl;
}
static void scst_set_write_len(struct scst_cmd *cmd)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|