From owner-svn-src-head@freebsd.org Wed Jan 4 12:50:45 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 874C1C9CE3A; Wed, 4 Jan 2017 12:50:45 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 56C9E1BB6; Wed, 4 Jan 2017 12:50:45 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v04CoiaS085211; Wed, 4 Jan 2017 12:50:44 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v04Coits085210; Wed, 4 Jan 2017 12:50:44 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201701041250.v04Coits085210@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Wed, 4 Jan 2017 12:50:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311283 - head/sys/cam/ctl X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Jan 2017 12:50:45 -0000 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 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); }