From owner-svn-src-all@FreeBSD.ORG Mon Feb 9 20:22:51 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 39427381; Mon, 9 Feb 2015 20:22:51 +0000 (UTC) Received: from mail.strugglingcoder.info (strugglingcoder.info [65.19.130.35]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2303A9CD; Mon, 9 Feb 2015 20:22:51 +0000 (UTC) Received: from localhost (unknown [10.1.1.3]) (Authenticated sender: hiren@strugglingcoder.info) by mail.strugglingcoder.info (Postfix) with ESMTPSA id D5345CE40C; Mon, 9 Feb 2015 12:22:50 -0800 (PST) Date: Mon, 9 Feb 2015 12:22:50 -0800 From: hiren panchasara To: Randall Stewart Subject: Re: svn commit: r278472 - in head/sys: netinet netinet6 Message-ID: <20150209202250.GG10438@strugglingcoder.info> References: <201502091928.t19JSC5P066293@svn.freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="rV8arf8D5Dod9UkK" Content-Disposition: inline In-Reply-To: <201502091928.t19JSC5P066293@svn.freebsd.org> User-Agent: Mutt/1.5.23 (2014-03-12) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 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: Mon, 09 Feb 2015 20:22:51 -0000 --rV8arf8D5Dod9UkK Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On 02/09/15 at 07:28P, Randall Stewart wrote: > Author: rrs > Date: Mon Feb 9 19:28:11 2015 > New Revision: 278472 > URL: https://svnweb.freebsd.org/changeset/base/278472 >=20 > Log: > This fixes a bug in the way that the LLE timers for nd6 > and arp were being used. They basically would pass in the > mutex to the callout_init. Because they used this method > to the callout system, it was possible to "stop" the callout. > When flushing the table and you stopped the running callout, the > callout_stop code would return 1 indicating that it was going > to stop the callout (that was about to run on the callout_wheel blocked > by the function calling the stop). Now when 1 was returned, it would > lower the reference count one extra time for the stopped timer, then > a few lines later delete the memory. Of course the callout_wheel was > stuck in the lock code and would then crash since it was accessing > freed memory. By using callout_init(c, 1) we always get a 0 back > and the reference counting bug does not rear its head. We do have > to make a few adjustments to the callouts themselves though to make > sure it does the proper thing if rescheduled as well as gets the lock. > =20 > Commented upon by hiren and sbruno > See Phabricator D1777 for more details. > =20 > Commented upon by hiren and sbruno > Reviewed by: adrian, jhb and bz > Sponsored by: Netflix Inc. Thanks for the fix, Randall. When do you plan to MFC this? It'd be nice to have this MFC'd along with D1711 changes so that we do not see panics reported in the review. Cheers, Hiren --rV8arf8D5Dod9UkK Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (FreeBSD) iQF8BAEBCgBmBQJU2RcYXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXRBNEUyMEZBMUQ4Nzg4RjNGMTdFNjZGMDI4 QjkyNTBFMTU2M0VERkU1AAoJEIuSUOFWPt/lfGsH/RBD/Yeu9OLknO1vN7bS1poh WBrOx3TK0DxjMCECVuigWMucPf1bY6H5kr4GQtjzUihv5nJjanUstgT6WGyHvUn0 4SH+5H9vGT3g4msgMkAK8oQjgbgw2sY7M861v8/TQGlqJ/jkF7x0qr4auHbS/H2/ 4PZO3wveFihye828u6IOwRlFGFoW6g+4CZaFRH74gHskYWywDiloMCOvV/gaw49i HkZb0GNeo22yW/IVhwWa+M91KxNDhQS/e3R+DrI4ta4LdZSUMAyfi4cPy9isy7G8 iw+KM3GbYAemVy5KaJyZG0GTPSw0EZhRJ++DUkMaT4fY5NxEfl4pjoSIjZG/pTc= =+Lmp -----END PGP SIGNATURE----- --rV8arf8D5Dod9UkK--