From owner-svn-src-all@FreeBSD.ORG Fri Oct 4 19:31:42 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 32F7A25E; Fri, 4 Oct 2013 19:31:42 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 06C3D2229; Fri, 4 Oct 2013 19:31:42 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r94JVfwW006682; Fri, 4 Oct 2013 19:31:41 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r94JVfvj006676; Fri, 4 Oct 2013 19:31:41 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <201310041931.r94JVfvj006676@svn.freebsd.org> From: Edward Tomasz Napierala Date: Fri, 4 Oct 2013 19:31:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r256058 - in head/sys: cam/ctl 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.14 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, 04 Oct 2013 19:31:42 -0000 Author: trasz Date: Fri Oct 4 19:31:41 2013 New Revision: 256058 URL: http://svnweb.freebsd.org/changeset/base/256058 Log: Don't leak memory when removing an unconnected session, and remove useless UMA_ZONE_NOFREE that caused another leak when unloading the module. Approved by: re (glebius) Sponsored by: FreeBSD Foundation Modified: head/sys/cam/ctl/ctl_frontend_iscsi.c head/sys/dev/iscsi/icl.c head/sys/dev/iscsi/iscsi.c Modified: head/sys/cam/ctl/ctl_frontend_iscsi.c ============================================================================== --- head/sys/cam/ctl/ctl_frontend_iscsi.c Fri Oct 4 18:44:47 2013 (r256057) +++ head/sys/cam/ctl/ctl_frontend_iscsi.c Fri Oct 4 19:31:41 2013 (r256058) @@ -1255,7 +1255,7 @@ cfiscsi_init(void) cfiscsi_data_wait_zone = uma_zcreate("cfiscsi_data_wait", sizeof(struct cfiscsi_data_wait), NULL, NULL, NULL, NULL, - UMA_ALIGN_PTR, UMA_ZONE_NOFREE); + UMA_ALIGN_PTR, 0); return (0); Modified: head/sys/dev/iscsi/icl.c ============================================================================== --- head/sys/dev/iscsi/icl.c Fri Oct 4 18:44:47 2013 (r256057) +++ head/sys/dev/iscsi/icl.c Fri Oct 4 19:31:41 2013 (r256058) @@ -957,6 +957,7 @@ icl_pdu_queue(struct icl_pdu *ip) if (ic->ic_disconnecting || ic->ic_socket == NULL) { ICL_DEBUG("icl_pdu_queue on closed connection"); ICL_CONN_UNLOCK(ic); + icl_pdu_free(ip); return; } TAILQ_INSERT_TAIL(&ic->ic_to_send, ip, ip_next); @@ -1259,10 +1260,10 @@ icl_load(void) icl_conn_zone = uma_zcreate("icl_conn", sizeof(struct icl_conn), NULL, NULL, NULL, NULL, - UMA_ALIGN_PTR, UMA_ZONE_NOFREE); + UMA_ALIGN_PTR, 0); icl_pdu_zone = uma_zcreate("icl_pdu", sizeof(struct icl_pdu), NULL, NULL, NULL, NULL, - UMA_ALIGN_PTR, UMA_ZONE_NOFREE); + UMA_ALIGN_PTR, 0); refcount_init(&icl_ncons, 0); } Modified: head/sys/dev/iscsi/iscsi.c ============================================================================== --- head/sys/dev/iscsi/iscsi.c Fri Oct 4 18:44:47 2013 (r256057) +++ head/sys/dev/iscsi/iscsi.c Fri Oct 4 19:31:41 2013 (r256058) @@ -2030,7 +2030,7 @@ iscsi_load(void) iscsi_outstanding_zone = uma_zcreate("iscsi_outstanding", sizeof(struct iscsi_outstanding), NULL, NULL, NULL, NULL, - UMA_ALIGN_PTR, UMA_ZONE_NOFREE); + UMA_ALIGN_PTR, 0); error = make_dev_p(MAKEDEV_CHECKNAME, &sc->sc_cdev, &iscsi_cdevsw, NULL, UID_ROOT, GID_WHEEL, 0600, "iscsi");