Date: Fri, 12 Oct 2018 19:44:19 +0000 (UTC) From: "Kenneth D. Merry" <ken@FreeBSD.org> 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 Message-ID: <201810121944.w9CJiJvJ029715@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
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; }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201810121944.w9CJiJvJ029715>