From owner-svn-src-head@FreeBSD.ORG Wed Apr 29 16:55:07 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 D3D80943 for ; Wed, 29 Apr 2015 16:55:07 +0000 (UTC) Received: from nm1-vm10.bullet.mail.gq1.yahoo.com (nm1-vm10.bullet.mail.gq1.yahoo.com [98.136.218.89]) (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 A879F198A for ; Wed, 29 Apr 2015 16:55:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1430326098; bh=n2rurvnCV4oT/dXFnSxGTVGnkjYGmQNIWQK+bGOxafk=; h=Subject:From:In-Reply-To:Date:Cc:References:To:From:Subject; b=c+QalPcz59f2KyJRdfdTbYyEXkzGkfhzHPTlvPJ0zRtu8DQihTwHyZ8S6aS0aoBvZsoHyUiGVxWEihl2Q97hBfHHDfBsTcHtH4rtQj6mAGrZZvxm0VvE7Aat+DL46RQTYfwGr18qDK6A76/EI79AqbBxPHu4NYuLJ9n2wYCxDJK8UQdJqS6sKqLuoXir8IbAelLI27PgR7J/gvQjIii+1MqwX6+1IObo//QI4FSEQF+HYC2jH2pGNnqBrtmsZesPmir8CTZeaUXZuqyTZZWIRLX7MOVp7GIukh5XXpCtgr8Rdbb3dIQfzCW4INriywtcmN/DOrcp6tMxm/xbzkjnCw== Received: from [98.137.12.57] by nm1.bullet.mail.gq1.yahoo.com with NNFMP; 29 Apr 2015 16:48:18 -0000 Received: from [208.71.42.191] by tm2.bullet.mail.gq1.yahoo.com with NNFMP; 29 Apr 2015 16:48:18 -0000 Received: from [127.0.0.1] by smtp202.mail.gq1.yahoo.com with NNFMP; 29 Apr 2015 16:48:18 -0000 X-Yahoo-Newman-Id: 241718.83595.bm@smtp202.mail.gq1.yahoo.com X-Yahoo-Newman-Property: ymail-3 X-YMail-OSG: yNgmgd4VM1nglwlokeur9DbXv1gYbzrK7bD2KaJJ1JpT4Z7 CP7VhWSNaDq33wMEglVxt6.h3wtb4SYiPNbqvM2ZNRdolQN6ZXQ9PHpX0pPO 8Zr6DUskH6DKdKHv9rcTD6nNjgE0uo8ZRAQg14uz7hNZetIJJnnlvk4UU.BY _tISJ9Krf3j.Ogdwfnyc2bwzmVPuX2tqrTCKPfdTE3.95jOleZutDzuCTEiH 1IhOx0YsGInuciEE5emOwU3vO1GHR8guJsKiXrUWPw62rqZVr0sHFuhiQOPY LgGgO9ZgkfD8o19D_SkgjwFJUdkotZM50_3YaLR9lcFX5LrrwvzyvVYMePCK GexRpK.NpnNpcqN7qVizJVNQjHXf0XTweDA7CSnt7Ubmq.uNKJqaFsfsl5RD b2ftMIwmO2qQiWCxDyoqnWtospmkIm4qrzkZIsJEXoxW1GasY5shh4xxrR8B KsHW6fL6wRkSF3Pk0_jMB6dQF_NxV7j9zZ7bgvaY62LFIJr4SAK9wP6lELy5 IpP8IoWr8bRBh9hc7KmeztLn3D9fhrF4mxhRhzboN X-Yahoo-SMTP: clhABp.swBB7fs.LwIJpv3jkWgo2NU8- Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2070.6\)) Subject: Re: svn commit: r282227 - head/sys/cam/scsi From: Scott Long In-Reply-To: <201504291546.t3TFkwwU073637@svn.freebsd.org> Date: Wed, 29 Apr 2015 10:48:16 -0600 Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Transfer-Encoding: quoted-printable Message-Id: <8FE78308-75E2-4161-9EC8-3B0823EEBE7E@yahoo.com> References: <201504291546.t3TFkwwU073637@svn.freebsd.org> To: "Pedro F. Giffuni" X-Mailer: Apple Mail (2.2070.6) 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 16:55:08 -0000 This commit is broken, please revert: Fatal trap 12: page fault while in kernel mode cpuid =3D 0; apic id =3D 00 fault virtual address =3D 0x21000002d8 fault code =3D supervisor read data, page not present instruction pointer =3D 0x20:0xffffffff802fd074 stack pointer =3D 0x28:0xfffffe100678f960 frame pointer =3D 0x28:0xfffffe100678f9e0 code segment =3D base 0x0, limit 0xfffff, type 0x1b =3D DPL 0, pres 1, long 1, def32 0, gran 1 processor eflags =3D interrupt enabled, resume, IOPL =3D 0 current process =3D 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 =3D 0, rsp =3D 0xfffffe100678fb70, rbp =3D 0 --- db>=20 > On Apr 29, 2015, at 9:46 AM, Pedro F. Giffuni wrote: >=20 > Author: pfg > Date: Wed Apr 29 15:46:57 2015 > New Revision: 282227 > URL: https://svnweb.freebsd.org/changeset/base/282227 >=20 > Log: > Fix memory leak in scsi_scan_bus() >=20 > CID: 1007770 > PR: 199671 >=20 > Modified: > head/sys/cam/scsi/scsi_xpt.c >=20 > Modified: head/sys/cam/scsi/scsi_xpt.c > = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D > --- 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 =3D NULL; > request_ccb->ccb_h.status =3D status; > xpt_free_ccb(work_ccb); > xpt_done(request_ccb); > @@ -2017,6 +2018,7 @@ scsi_scan_bus(struct cam_periph *periph, > if (work_ccb =3D=3D NULL) { > xpt_free_ccb((union ccb = *)scan_info->cpi); > free(scan_info, M_CAMXPT); > + scan_info =3D NULL; > xpt_free_path(path); > request_ccb->ccb_h.status =3D = CAM_RESRC_UNAVAIL; > xpt_done(request_ccb); > @@ -2032,6 +2034,7 @@ scsi_scan_bus(struct cam_periph *periph, > xpt_action(work_ccb); > } >=20 > + free(scan_info, M_CAMXPT); > mtx_lock(mtx); > break; > } >=20