From owner-svn-src-head@FreeBSD.ORG Wed Apr 29 18:11:06 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id CC4F810F for ; Wed, 29 Apr 2015 18:11:06 +0000 (UTC) Received: from nm16.bullet.mail.bf1.yahoo.com (nm16.bullet.mail.bf1.yahoo.com [98.139.212.175]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8B07712C7 for ; Wed, 29 Apr 2015 18:11:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1430331058; bh=IKruCFHrioXrgmZaP0alUVvTg50Fb2D95EWSqU73+ko=; h=Date:From:To:CC:Subject:References:In-Reply-To:From:Subject; b=QoykqKEJxoU8Pl1BgO5I6v3KSfWbX0Lze2DSUjJJIV/AsYjKQ0/N+bPOREp7Ggg3JM+Egb6JptsfLkpHZpUqNlYY5H7UDHC8AwBwmROUJv/LYFCQMuUyegNCDMQLpM5CjyR62ilLuB3eI3n7uhr4MA+jIsz2NIHlmHKkYWZ3rQ+K9ghHZiVlM9BgE/fJKla/GPzyOwhuPIS2XuWjzWgYWvUHj8+tAAkq6fo04f2v9bqz6A24n6neZkHT6YbK/v09To8+pZggXSElcQJNVbsbZ05dVwyA0MQyQwRP/OprKMtnpH+rwRBw4CTrAQDm8o1f/zcEv5cVfCVDBmTm3ixpGQ== Received: from [66.196.81.172] by nm16.bullet.mail.bf1.yahoo.com with NNFMP; 29 Apr 2015 18:10:58 -0000 Received: from [98.139.213.15] by tm18.bullet.mail.bf1.yahoo.com with NNFMP; 29 Apr 2015 18:10:58 -0000 Received: from [127.0.0.1] by smtp115.mail.bf1.yahoo.com with NNFMP; 29 Apr 2015 18:10:58 -0000 X-Yahoo-Newman-Id: 373371.27569.bm@smtp115.mail.bf1.yahoo.com X-Yahoo-Newman-Property: ymail-3 X-YMail-OSG: jx2XUscVM1m_tMVlLHpnegLlY7dgudRk8AXffO91lPL_XFM mH8ec0Iu10PqewPk7.vws4ngVmK7BEm.ilFWqSdAUnbV4fjYlEbZ.42pRod8 vfN5eAifq7s1v6DSic4EdpVxUxS6N8.TNSIjB5xKXDuX70fM92vYvwl52o6h a4kyt3gkDSDsALdJ_CAvPVueYro_EoHbwzI2Ipk5oFdlZ1pEHR7HVvctq3Hz Rbd4jhf4DGLPgRc3kPEkw.FvnR0hCkKEcj8hwGSDkB7rZ2Fm_hhFiroVmD6a BZTid6MokOBFtCfnLG9FaRVyzCvYBlzRQjmlW05E2MgmC51oxHXNeAXBNToJ Tsxzl0SljewP_0YiAwUgEWngL1HgByt23eYxNDaBAdHbsp7Jns4ecMQNfk1y 3CgPnhxxXvpyUjEh5w5i6DLXChEx23eUgHxf0x1cWDdx5KnbdJ7L6YysvriO OOK4srgvK4fpxWefN.w0EfACT_jxtiA3hx1WZP72LcWwC2DZUj00YgmXNAdY Chzy3ZiYqGbydhlsGJ__HGsrzvqaFbdMs X-Yahoo-SMTP: xcjD0guswBAZaPPIbxpWwLcp9Unf Message-ID: <55411EB8.9020800@FreeBSD.org> Date: Wed, 29 Apr 2015 13:11:04 -0500 From: Pedro Giffuni User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:31.0) Gecko/20100101 Thunderbird/31.6.0 MIME-Version: 1.0 To: Scott Long CC: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r282227 - head/sys/cam/scsi References: <201504291546.t3TFkwwU073637@svn.freebsd.org> <8FE78308-75E2-4161-9EC8-3B0823EEBE7E@yahoo.com> In-Reply-To: <8FE78308-75E2-4161-9EC8-3B0823EEBE7E@yahoo.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 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, 29 Apr 2015 18:11:07 -0000 Thanks for finding .. and reverting (I was AFK). I'll document this in Bugzilla and Coverity. Pedro. On 04/29/15 11:48, Scott Long wrote: > This commit is broken, please revert: > > Fatal trap 12: page fault while in kernel mode > cpuid = 0; apic id = 00 > fault virtual address = 0x21000002d8 > fault code = supervisor read data, page not present > instruction pointer = 0x20:0xffffffff802fd074 > stack pointer = 0x28:0xfffffe100678f960 > frame pointer = 0x28:0xfffffe100678f9e0 > code segment = base 0x0, limit 0xfffff, type 0x1b > = DPL 0, pres 1, long 1, def32 0, gran 1 > processor eflags = interrupt enabled, resume, IOPL = 0 > current process = 2 (doneq0) > [ thread pid 2 tid 100025 ] > Stopped at scsi_scan_bus+0x54: movq 0x58(%rax),%rdi > db> bt > Tracing pid 2 tid 100025 td 0xfffff8000d3ac940 > scsi_scan_bus() at scsi_scan_bus+0x54/frame 0xfffffe100678f9e0 > xpt_done_process() at xpt_done_process+0x521/frame 0xfffffe100678fa20 > xpt_done_td() at xpt_done_td+0xf6/frame 0xfffffe100678fa70 > fork_exit() at fork_exit+0x71/frame 0xfffffe100678fab0 > fork_trampoline() at fork_trampoline+0xe/frame 0xfffffe100678fab0 > --- trap 0, rip = 0, rsp = 0xfffffe100678fb70, rbp = 0 --- > db> > > >> On Apr 29, 2015, at 9:46 AM, Pedro F. Giffuni wrote: >> >> Author: pfg >> Date: Wed Apr 29 15:46:57 2015 >> New Revision: 282227 >> URL: https://svnweb.freebsd.org/changeset/base/282227 >> >> Log: >> Fix memory leak in scsi_scan_bus() >> >> CID: 1007770 >> PR: 199671 >> >> Modified: >> head/sys/cam/scsi/scsi_xpt.c >> >> Modified: head/sys/cam/scsi/scsi_xpt.c >> ============================================================================== >> --- head/sys/cam/scsi/scsi_xpt.c Wed Apr 29 15:41:19 2015 (r282226) >> +++ head/sys/cam/scsi/scsi_xpt.c Wed Apr 29 15:46:57 2015 (r282227) >> @@ -2008,6 +2008,7 @@ scsi_scan_bus(struct cam_periph *periph, >> " with status %#x, bus scan halted\n", >> status); >> free(scan_info, M_CAMXPT); >> + scan_info = NULL; >> request_ccb->ccb_h.status = status; >> xpt_free_ccb(work_ccb); >> xpt_done(request_ccb); >> @@ -2017,6 +2018,7 @@ scsi_scan_bus(struct cam_periph *periph, >> if (work_ccb == NULL) { >> xpt_free_ccb((union ccb *)scan_info->cpi); >> free(scan_info, M_CAMXPT); >> + scan_info = NULL; >> xpt_free_path(path); >> request_ccb->ccb_h.status = CAM_RESRC_UNAVAIL; >> xpt_done(request_ccb); >> @@ -2032,6 +2034,7 @@ scsi_scan_bus(struct cam_periph *periph, >> xpt_action(work_ccb); >> } >> >> + free(scan_info, M_CAMXPT); >> mtx_lock(mtx); >> break; >> } >>