Author: trasz
Date: Sat Mar 18 23:57:47 2017
New Revision: 315520
URL: https://svnweb.freebsd.org/changeset/base/315520

Log:
  MFC r311283:
  
  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.

Modified:
  stable/11/sys/cam/ctl/ctl_frontend_iscsi.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/sys/cam/ctl/ctl_frontend_iscsi.c
==============================================================================
--- stable/11/sys/cam/ctl/ctl_frontend_iscsi.c  Sat Mar 18 23:55:50 2017        
(r315519)
+++ stable/11/sys/cam/ctl/ctl_frontend_iscsi.c  Sat Mar 18 23:57:47 2017        
(r315520)
@@ -2974,7 +2974,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:
@@ -2987,4 +2986,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);
 }
_______________________________________________
[email protected] mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "[email protected]"

Reply via email to