From owner-svn-src-all@freebsd.org Fri Mar 25 16:01:41 2016 Return-Path: Delivered-To: svn-src-all@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 B3A04ADD81F; Fri, 25 Mar 2016 16:01:41 +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 72DC71833; Fri, 25 Mar 2016 16:01:41 +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 u2PG1eB8000708; Fri, 25 Mar 2016 16:01:40 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u2PG1eBh000707; Fri, 25 Mar 2016 16:01:40 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201603251601.u2PG1eBh000707@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Fri, 25 Mar 2016 16:01:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r297268 - head/sys/dev/iscsi X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 Mar 2016 16:01:41 -0000 Author: trasz Date: Fri Mar 25 16:01:40 2016 New Revision: 297268 URL: https://svnweb.freebsd.org/changeset/base/297268 Log: Fix iSCSI initiator crash that could happen with out-of-memory conditions with in-flight IO and subsequent reconnection. PR: 199117 MFC after: 1 month Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D5673 Modified: head/sys/dev/iscsi/iscsi.c Modified: head/sys/dev/iscsi/iscsi.c ============================================================================== --- head/sys/dev/iscsi/iscsi.c Fri Mar 25 08:26:37 2016 (r297267) +++ head/sys/dev/iscsi/iscsi.c Fri Mar 25 16:01:40 2016 (r297268) @@ -2222,6 +2222,7 @@ iscsi_action_scsiio(struct iscsi_session error = icl_pdu_append_data(request, csio->data_ptr, len, M_NOWAIT); if (error != 0) { + iscsi_outstanding_remove(is, io); icl_pdu_free(request); if ((ccb->ccb_h.status & CAM_DEV_QFRZN) == 0) { xpt_freeze_devq(ccb->ccb_h.path, 1);