Date: Wed, 4 Jan 2017 12:50:44 +0000 (UTC) From: Edward Tomasz Napierala <trasz@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311283 - head/sys/cam/ctl Message-ID: <201701041250.v04Coits085210@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
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); }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201701041250.v04Coits085210>