From owner-freebsd-stable Mon May 20 8:10: 4 2002 Delivered-To: freebsd-stable@freebsd.org Received: from duke.cs.duke.edu (duke.cs.duke.edu [152.3.140.1]) by hub.freebsd.org (Postfix) with ESMTP id 7DA0937B403; Mon, 20 May 2002 08:09:57 -0700 (PDT) Received: from moe.cs.duke.edu (moe.cs.duke.edu [152.3.140.74]) by duke.cs.duke.edu (8.9.3/8.9.3) with ESMTP id LAA07107; Mon, 20 May 2002 11:09:56 -0400 (EDT) Received: (gallatin@localhost) by moe.cs.duke.edu (8.8.5/8.6.9) id LAA02255; Mon, 20 May 2002 11:09:56 -0400 (EDT) From: Andrew Gallatin MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <15593.4548.519462.433420@moe.cs.duke.edu> Date: Mon, 20 May 2002 11:09:56 -0400 (EDT) To: Paul Herman Cc: imp@freebsd.org, freebsd-stable@freebsd.org Subject: ipl problem in wi_hostapp.c ? In-Reply-To: <20020517123019.V1458-100000@mammoth.eat.frenchfries.net> References: <20020517115857.Y1458-100000@mammoth.eat.frenchfries.net> <20020517123019.V1458-100000@mammoth.eat.frenchfries.net> X-Mailer: VM 6.72 under 21.1 (patch 9) "Canyonlands" XEmacs Lucid Sender: owner-freebsd-stable@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Paul Herman writes: <..> > #13 0xc0214604 in biodone (bp=0xc377880c) at /usr/src/sys/kern/vfs_bio.c:2698 > #14 0xc015ca1f in ad_interrupt (request=0xc1157880) > at /usr/src/sys/dev/ata/ata-disk.c:694 > #15 0xc01540e8 in ata_intr (data=0xc0f9ff00) > at /usr/src/sys/dev/ata/ata-all.c:614 > #16 0xc0369f12 in vec14 () > #17 0xc01cbe32 in wihap_data_input (sc=0xc0f9a000, rxfrm=0xcc920cd0, > m=0xc0b2f500) at /usr/src/sys/dev/wi/wi_hostap.c:1082 > #18 0xc01c6e16 in wi_rxeof (sc=0xc0f9a000) at /usr/src/sys/dev/wi/if_wi.c:720 > #19 0xc01c710e in wi_intr (xsc=0xc0f9a000) at /usr/src/sys/dev/wi/if_wi.c:856 > #20 0xc0375d92 in generic_bcopy () > #21 0xc0225537 in spec_strategy (ap=0xcc920e0c) > at /usr/src/sys/miscfs/specfs/spec_vnops.c:453 <..> I think the splsoftclock in wihap_data_input is clobbering the IPL state. The filesystem code should be running at splbio. The network interrupt is handled at splnet. wihap_data_input() is run from the wi interrupt handler and goes to splsoftclock. Now an interrupt which should have been masked by splbio gets in. If I'm reading the x86 ipl_funcs.c correctly, splsoftclock is one of the few functions that does not OR in a new ipl to mask. Rather it replaces the existing mask with SWI_CLOCK_MASK, which unmasks disk interrupts. What happens if you replace the calls to splsoftclock() with calls to splhigh()? Drew To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-stable" in the body of the message