Author: trasz
Date: Wed Jan  4 12:50:44 2017
New Revision: 311283
URL: https://svnweb.freebsd.org/changeset/base/311283

Log:
  Don't release the cfiscsi session refcount too early.  It wasn't
  observed to fix any actual error, but it's the right thing to do
  from the correctness point of view.
  
  Tested by:    Eugene M. Zheganin <emz at norma.perm.ru>
  MFC after:    1 month

Modified:
  head/sys/cam/ctl/ctl_frontend_iscsi.c

Modified: head/sys/cam/ctl/ctl_frontend_iscsi.c
==============================================================================
--- head/sys/cam/ctl/ctl_frontend_iscsi.c       Wed Jan  4 10:08:18 2017        
(r311282)
+++ head/sys/cam/ctl/ctl_frontend_iscsi.c       Wed Jan  4 12:50:44 2017        
(r311283)
@@ -2963,7 +2963,6 @@ cfiscsi_done(union ctl_io *io)
 
        request = io->io_hdr.ctl_private[CTL_PRIV_FRONTEND].ptr;
        cs = PDU_SESSION(request);
-       refcount_release(&cs->cs_outstanding_ctl_pdus);
 
        switch (request->ip_bhs->bhs_opcode & ~ISCSI_BHS_OPCODE_IMMEDIATE) {
        case ISCSI_BHS_OPCODE_SCSI_COMMAND:
@@ -2976,4 +2975,6 @@ cfiscsi_done(union ctl_io *io)
                panic("cfiscsi_done called with wrong opcode 0x%x",
                    request->ip_bhs->bhs_opcode);
        }
+
+       refcount_release(&cs->cs_outstanding_ctl_pdus);
 }
_______________________________________________
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to