From owner-cvs-all Wed Dec 5 14:52:42 2001 Delivered-To: cvs-all@freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id 7899A37B405; Wed, 5 Dec 2001 14:52:36 -0800 (PST) Received: (from luigi@localhost) by freefall.freebsd.org (8.11.6/8.11.6) id fB5Mqa521638; Wed, 5 Dec 2001 14:52:36 -0800 (PST) (envelope-from luigi) Message-Id: <200112052252.fB5Mqa521638@freefall.freebsd.org> From: Luigi Rizzo Date: Wed, 5 Dec 2001 14:52:36 -0800 (PST) To: cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: cvs commit: src/sys/pci if_dc.c if_sis.c X-FreeBSD-CVS-Branch: RELENG_4 Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG luigi 2001/12/05 14:52:36 PST Modified files: (Branch: RELENG_4) sys/pci if_dc.c if_sis.c Log: Move the clearing of IFF_RUNNING early in *_stop(), before actually freeing resources (IFF_RUNNING means resources _are_ allocated). Because *_stop() is not protected by splimp(), and it is not always called at splimp() (e.g. from *_shutdown()), the old code could potentially cause a panic at shutdown in the very rare case you get an interrupt from a device sharing the same IRQ line in the middle of *_stop(). With polling enabled, this "rare" case become slightly more frequent because clock interrupts can also hit you in the middle of *_stop(). Note that this was a bug in the original drivers, not in the polling code. Note also that some other drivers (not all) have a similar bug. The code in CURRENT seems to be safe because *_stop() is wrapped in LOCK/UNLOCK calls. Maybe it would be more robust to use splimp() around *_stop() as well. Revision Changes Path 1.9.2.28 +2 -2 src/sys/pci/if_dc.c 1.13.4.13 +3 -2 src/sys/pci/if_sis.c To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message