Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 19 Sep 2005 08:50:28 +0300
From:      Ruslan Ermilov <ru@freebsd.org>
To:        Warner Losh <imp@freebsd.org>
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 ...
Message-ID:  <20050919055028.GC65954@ip.net.ua>
In-Reply-To: <200509190310.j8J3ALgt095979@repoman.freebsd.org>
References:  <200509190310.j8J3ALgt095979@repoman.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help

--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--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20050919055028.GC65954>