From owner-svn-src-stable@freebsd.org Fri Oct 12 19:44:20 2018 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5735510C8805; Fri, 12 Oct 2018 19:44:20 +0000 (UTC) (envelope-from ken@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 0299172BED; Fri, 12 Oct 2018 19:44:20 +0000 (UTC) (envelope-from ken@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id F184D23E24; Fri, 12 Oct 2018 19:44:19 +0000 (UTC) (envelope-from ken@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w9CJiJWN029716; Fri, 12 Oct 2018 19:44:19 GMT (envelope-from ken@FreeBSD.org) Received: (from ken@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w9CJiJvJ029715; Fri, 12 Oct 2018 19:44:19 GMT (envelope-from ken@FreeBSD.org) Message-Id: <201810121944.w9CJiJvJ029715@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ken set sender to ken@FreeBSD.org using -f From: "Kenneth D. Merry" Date: Fri, 12 Oct 2018 19:44:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r339336 - stable/11/sys/cam/scsi X-SVN-Group: stable-11 X-SVN-Commit-Author: ken X-SVN-Commit-Paths: stable/11/sys/cam/scsi X-SVN-Commit-Revision: 339336 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 Oct 2018 19:44:20 -0000 Author: ken Date: Fri Oct 12 19:44:19 2018 New Revision: 339336 URL: https://svnweb.freebsd.org/changeset/base/339336 Log: MFC r339076 This has been edited slightly from the version in head. In head, the probe sections of dadone() were split out into separate functions. In stable/11, dadone() is still a single function. So, for stable/11, this describes the change: sys/cam/scsi/scsi_da.c: In the DA_CCB_PROBE_DONE case in dadone(), free the data pointer before returning. ------------------------------------------------------------------------ r339076 | ken | 2018-10-01 13:00:46 -0600 (Mon, 01 Oct 2018) | 12 lines Fix a da(4) driver memory leak for SCSI SMR devices. In the probe case for SCSI SMR Host Aware or Most Managed drives, be sure to free allocated memory. sys/cam/scsi/scsi_da.c: In dadone_probezone(), free the data pointer before returning. Sponsored by: Spectra Logic ------------------------------------------------------------------------ Sponsored by: Spectra Logic Modified: stable/11/sys/cam/scsi/scsi_da.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/cam/scsi/scsi_da.c ============================================================================== --- stable/11/sys/cam/scsi/scsi_da.c Fri Oct 12 16:55:28 2018 (r339335) +++ stable/11/sys/cam/scsi/scsi_da.c Fri Oct 12 19:44:19 2018 (r339336) @@ -5354,6 +5354,9 @@ dadone(struct cam_periph *periph, union ccb *done_ccb) } } } + + free(csio->data_ptr, M_SCSIDA); + daprobedone(periph, done_ccb); return; }