From owner-cvs-src@FreeBSD.ORG Mon Sep 12 19:03:54 2005 Return-Path: X-Original-To: cvs-src@FreeBSD.org Delivered-To: cvs-src@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C248716A41F; Mon, 12 Sep 2005 19:03:54 +0000 (GMT) (envelope-from brdavis@odin.ac.hmc.edu) Received: from odin.ac.hmc.edu (Odin.AC.HMC.Edu [134.173.32.75]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6BBC443D48; Mon, 12 Sep 2005 19:03:54 +0000 (GMT) (envelope-from brdavis@odin.ac.hmc.edu) Received: from odin.ac.hmc.edu (localhost.localdomain [127.0.0.1]) by odin.ac.hmc.edu (8.13.0/8.13.0) with ESMTP id j8CJ3r61010670; Mon, 12 Sep 2005 12:03:53 -0700 Received: (from brdavis@localhost) by odin.ac.hmc.edu (8.13.0/8.13.0/Submit) id j8CJ3rjA010669; Mon, 12 Sep 2005 12:03:53 -0700 Date: Mon, 12 Sep 2005 12:03:53 -0700 From: Brooks Davis To: John Baldwin Message-ID: <20050912190353.GC24946@odin.ac.hmc.edu> References: <200509081350.j88DoG5s039090@repoman.freebsd.org> <200509121451.15539.jhb@FreeBSD.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="KN5l+BnMqAQyZLvT" Content-Disposition: inline In-Reply-To: <200509121451.15539.jhb@FreeBSD.org> User-Agent: Mutt/1.4.1i X-Virus-Scanned: by amavisd-new X-Spam-Status: No, hits=0.0 required=8.0 tests=none autolearn=no version=2.63 X-Spam-Checker-Version: SpamAssassin 2.63 (2004-01-11) on odin.ac.hmc.edu Cc: cvs-src@FreeBSD.org, src-committers@FreeBSD.org, cvs-all@FreeBSD.org, Ken Smith Subject: Re: cvs commit: src/sys/dev/hme if_hme.c X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Sep 2005 19:03:54 -0000 --KN5l+BnMqAQyZLvT Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Sep 12, 2005 at 02:51:14PM -0400, John Baldwin wrote: > On Thursday 08 September 2005 09:50 am, Ken Smith wrote: > > kensmith 2005-09-08 13:50:16 UTC > > > > FreeBSD src repository > > > > Modified files: > > sys/dev/hme if_hme.c > > Log: > > Move hme_stop() after ether_ifdetach() and if_free() to prevent a > > memory-referenced-after-free panic if the hme interface fails to > > attach. > > > > Patch obtained from: marius > > Suggested same thing: brooks > > > > MFC after: 3 days >=20 > Umm, can't this lead to panics due to hme_intr() dereferencing sc_ifp? W= hy=20 > not do what all the other ethernet drivers do: >=20 > if (device_is_attached(dev)) { > HME_LOCK(sc); > hme_stop(sc); > HME_UNLOCK(sc); > callout_drain(..); > ether_ifdetach(...); > if_free(...); > } >=20 > For references of similar drivers look at the detach methods for xl(4),= =20 > pcn(4), wb(4), dc(4), sf(4), etc. The commit message is backwards. It's actually correcting this bug (I think Ken sent a followup). -- Brooks --=20 Any statement of the form "X is the one, true Y" is FALSE. PGP fingerprint 655D 519C 26A7 82E7 2529 9BF0 5D8E 8BE9 F238 1AD4 --KN5l+BnMqAQyZLvT Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.1 (GNU/Linux) iD8DBQFDJdEZXY6L6fI4GtQRAr3rAJoC/4ls87kh5dVDQ7gPoLOCaNYnHACfXcqp kCrgYxpv1eGRaplHN/JxMLI= =GAMW -----END PGP SIGNATURE----- --KN5l+BnMqAQyZLvT--