From owner-cvs-all@FreeBSD.ORG Mon Sep 19 03:52:00 2005 Return-Path: X-Original-To: cvs-all@FreeBSD.org Delivered-To: cvs-all@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 78AFD16A431 for ; Mon, 19 Sep 2005 03:51:59 +0000 (GMT) (envelope-from rik@cronyx.ru) Received: from hanoi.cronyx.ru (hanoi.cronyx.ru [144.206.181.53]) by mx1.FreeBSD.org (Postfix) with ESMTP id 456A543D45 for ; Mon, 19 Sep 2005 03:51:59 +0000 (GMT) (envelope-from rik@cronyx.ru) Received: (from root@localhost) by hanoi.cronyx.ru (8.13.0/vak/3.0) id j8J3mrAw057206 for cvs-all@FreeBSD.org.checked; Mon, 19 Sep 2005 07:48:53 +0400 (MSD) (envelope-from rik@cronyx.ru) Received: from cronyx.ru (localhost.cronyx.ru [127.0.0.1]) by hanoi.cronyx.ru (8.13.0/vak/3.0) with ESMTP id j8J3kCHh057188; Mon, 19 Sep 2005 07:46:12 +0400 (MSD) (envelope-from rik@cronyx.ru) Message-ID: <432E3252.5060608@cronyx.ru> Date: Mon, 19 Sep 2005 07:36:50 +0400 From: Roman Kurakin User-Agent: Mozilla/5.0 (X11; U; Linux i686; ru-RU; rv:1.2.1) Gecko/20030426 X-Accept-Language: ru-ru, en MIME-Version: 1.0 To: Warner Losh References: <200509190310.j8J3ALgt095979@repoman.freebsd.org> In-Reply-To: <200509190310.j8J3ALgt095979@repoman.freebsd.org> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit 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-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Sep 2005 03:52:01 -0000 I didn't check what was done for my drivers, but I'll put situation the other way. At the point we are going to unregister interrupt handler we have atleast half-stoped device. This may mean that any coming packet through if_start would reactivate device or put it to unknown state. Just as with problem you've tried to fix this is hardly depend on driver design. IMHO the better aproach is to set some flag for the interrupt handler that we should only clear any interrupts and ignore interrupt details. rik Warner Losh: >imp 2005-09-19 03:10:21 UTC > > FreeBSD src repository > > Modified files: > sys/dev/an if_an.c > sys/dev/arl if_arl_isa.c > sys/dev/awi if_awi_pccard.c > sys/dev/cm if_cm_isa.c > sys/dev/cnw if_cnw.c > sys/dev/cp if_cp.c > sys/dev/cs if_cs.c > sys/dev/ed if_ed.c > sys/dev/em if_em.c > sys/dev/en if_en_pci.c > sys/dev/ep if_ep.c > sys/dev/fe if_fe_pccard.c > sys/dev/if_ndis if_ndis.c > sys/dev/ipw if_ipw.c > sys/dev/iwi if_iwi.c > sys/dev/ixgb if_ixgb.c > sys/dev/lge if_lge.c > sys/dev/nge if_nge.c > sys/dev/nve if_nve.c > sys/dev/ral if_ral.c > sys/dev/ray if_ray.c > sys/dev/re if_re.c > sys/dev/sbsh if_sbsh.c > sys/dev/sio sio_pccard.c > sys/dev/sn if_sn.c > sys/dev/tx if_tx.c > sys/dev/txp if_txp.c > sys/dev/vge if_vge.c > sys/dev/wi if_wi.c > sys/dev/wl if_wl.c > sys/dev/xe if_xe_pccard.c > 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. > > Revision Changes Path > 1.71 +1 -1 src/sys/dev/an/if_an.c > 1.6 +1 -1 src/sys/dev/arl/if_arl_isa.c > 1.22 +1 -3 src/sys/dev/awi/if_awi_pccard.c > 1.8 +1 -1 src/sys/dev/cm/if_cm_isa.c > 1.22 +1 -1 src/sys/dev/cnw/if_cnw.c > 1.27 +3 -2 src/sys/dev/cp/if_cp.c > 1.43 +1 -1 src/sys/dev/cs/if_cs.c > 1.263 +1 -1 src/sys/dev/ed/if_ed.c > 1.70 +3 -1 src/sys/dev/em/if_em.c > 1.39 +1 -1 src/sys/dev/en/if_en_pci.c > 1.144 +1 -1 src/sys/dev/ep/if_ep.c > 1.28 +1 -1 src/sys/dev/fe/if_fe_pccard.c > 1.102 +3 -2 src/sys/dev/if_ndis/if_ndis.c > 1.14 +2 -1 src/sys/dev/ipw/if_ipw.c > 1.17 +2 -1 src/sys/dev/iwi/if_iwi.c > 1.14 +3 -2 src/sys/dev/ixgb/if_ixgb.c > 1.42 +1 -1 src/sys/dev/lge/if_lge.c > 1.79 +1 -1 src/sys/dev/nge/if_nge.c > 1.12 +3 -3 src/sys/dev/nve/if_nve.c > 1.17 +1 -1 src/sys/dev/ral/if_ral.c > 1.82 +1 -1 src/sys/dev/ray/if_ray.c > 1.54 +2 -2 src/sys/dev/re/if_re.c > 1.15 +2 -1 src/sys/dev/sbsh/if_sbsh.c > 1.16 +9 -21 src/sys/dev/sio/sio_pccard.c > 1.51 +1 -1 src/sys/dev/sn/if_sn.c > 1.92 +0 -1 src/sys/dev/tx/if_tx.c > 1.36 +3 -3 src/sys/dev/txp/if_txp.c > 1.18 +2 -2 src/sys/dev/vge/if_vge.c > 1.190 +1 -1 src/sys/dev/wi/if_wi.c > 1.70 +1 -1 src/sys/dev/wl/if_wl.c > 1.32 +1 -1 src/sys/dev/xe/if_xe_pccard.c > >