From owner-cvs-src@FreeBSD.ORG Mon Sep 19 05:50:15 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 BE60516A41F; Mon, 19 Sep 2005 05:50:15 +0000 (GMT) (envelope-from ru@ip.net.ua) Received: from mail.ipnet.kiev.ua (cielago.ip.net.ua [82.193.96.7]) by mx1.FreeBSD.org (Postfix) with ESMTP id EC4FE43D46; Mon, 19 Sep 2005 05:50:14 +0000 (GMT) (envelope-from ru@ip.net.ua) Received: from localhost (rocky.ip.net.ua [82.193.96.2]) by mail.ipnet.kiev.ua (8.12.11/8.12.11) with ESMTP id j8J5oD6X077667; Mon, 19 Sep 2005 08:50:13 +0300 (EEST) (envelope-from ru@ip.net.ua) Received: from mail.ipnet.kiev.ua ([82.193.96.7]) by localhost (rocky.ipnet [82.193.96.2]) (amavisd-new, port 10024) with LMTP id 84785-18; Mon, 19 Sep 2005 08:50:13 +0300 (EEST) Received: from heffalump.ip.net.ua (heffalump.ip.net.ua [82.193.96.213]) by mail.ipnet.kiev.ua (8.12.11/8.12.11) with ESMTP id j8J5oDax077664 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 19 Sep 2005 08:50:13 +0300 (EEST) (envelope-from ru@ip.net.ua) Received: (from ru@localhost) by heffalump.ip.net.ua (8.13.3/8.13.3) id j8J5oScn030865; Mon, 19 Sep 2005 08:50:28 +0300 (EEST) (envelope-from ru) Date: Mon, 19 Sep 2005 08:50:28 +0300 From: Ruslan Ermilov To: Warner Losh Message-ID: <20050919055028.GC65954@ip.net.ua> References: <200509190310.j8J3ALgt095979@repoman.freebsd.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="ncSAzJYg3Aa9+CRW" Content-Disposition: inline In-Reply-To: <200509190310.j8J3ALgt095979@repoman.freebsd.org> User-Agent: Mutt/1.5.9i X-Virus-Scanned: by amavisd-new at ip.net.ua Cc: cvs-src@freebsd.org, src-committers@freebsd.org, cvs-all@freebsd.org Subject: Re: cvs commit: src/sys/dev/an if_an.c src/sys/dev/arl if_arl_isa.c src/sys/dev/awi if_awi_pccard.c src/sys/dev/cm if_cm_isa.c src/sys/dev/cnw if_cnw.c src/sys/dev/cp if_cp.c src/sys/dev/cs if_cs.c src/sys/dev/ed if_ed.c src/sys/dev/em if_em.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, 19 Sep 2005 05:50:15 -0000 --ncSAzJYg3Aa9+CRW Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi, On Mon, Sep 19, 2005 at 03:10:21AM +0000, Warner Losh wrote: > imp 2005-09-19 03:10:21 UTC >=20 > FreeBSD src repository >=20 > Modified files: > sys/dev/an if_an.c=20 [...] > sys/dev/xe if_xe_pccard.c=20 > Log: > Make sure that we call if_free(ifp) after bus_teardown_intr. Since we > could get an interrupt after we free the ifp, and the interrupt > handler depended on the ifp being still alive, this could, in theory, > cause a crash. Eliminate this possibility by moving the if_free to > after the bus_teardown_intr() call. > =20 I'm going into more details in my other reply to your ed(4) commit, but I'm pretty sure you're attacking a wrong problem here. Most drivers don' assume and will behave badly (read: panic) if foo_intr() is called after foo_stop() (foo_stop() disables interrupts and usually frees some resources needed by code called from foo_intr()). A better fix that I had in mind (and that I think jhb@ has suggested) would be to return from foo_intr() quickly if IFF_DRV_RUNNING is not set. Can you reproduce the problem that you mention on real hardware? Cheers, --=20 Ruslan Ermilov ru@FreeBSD.org FreeBSD committer --ncSAzJYg3Aa9+CRW Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.1 (FreeBSD) iD8DBQFDLlGkqRfpzJluFF4RAsIOAJ4njNyf7ZcyjmGt84eNYgPvLe8EVQCcCgkK obGtOnHOae7b5XhKuo6weCA= =ixoi -----END PGP SIGNATURE----- --ncSAzJYg3Aa9+CRW--