| 
     
      
      
      From: <vl...@us...> - 2016-06-30 04:05:17
      
     
   | 
Revision: 6905
          http://sourceforge.net/p/scst/svn/6905
Author:   vlnb
Date:     2016-06-30 04:05:14 +0000 (Thu, 30 Jun 2016)
Log Message:
-----------
scst: fix possible error path crash in debug mode
It could happen, if a non-pass-through dev handler erroneously returned
SCST_EXEC_NOT_COMPLETED and TRAGE_DBG() statements enabled in debug mode.
Reported-by: Jeff Goldszer <jef...@al...>
Modified Paths:
--------------
    trunk/scst/src/scst_targ.c
Modified: trunk/scst/src/scst_targ.c
===================================================================
--- trunk/scst/src/scst_targ.c	2016-06-25 00:56:09 UTC (rev 6904)
+++ trunk/scst/src/scst_targ.c	2016-06-30 04:05:14 UTC (rev 6905)
@@ -3464,10 +3464,6 @@
 
 	scsi_dev = dev->scsi_dev;
 
-	TRACE_DBG("Sending cmd %p to SCSI mid-level dev %d:%d:%d:%lld", cmd,
-		  scsi_dev->host->host_no, scsi_dev->channel, scsi_dev->id,
-		  (u64)scsi_dev->lun);
-
 	if (unlikely(scsi_dev == NULL)) {
 		PRINT_ERROR("Command for virtual device must be "
 			"processed by device handler (LUN %lld)!",
@@ -3475,6 +3471,10 @@
 		goto out_error;
 	}
 
+	TRACE_DBG("Sending cmd %p to SCSI mid-level dev %d:%d:%d:%lld", cmd,
+		  scsi_dev->host->host_no, scsi_dev->channel, scsi_dev->id,
+		  (u64)scsi_dev->lun);
+
 	scst_set_exec_start(cmd);
 
 #if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 30)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
 |