Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 20 May 2002 11:09:56 -0400 (EDT)
From:      Andrew Gallatin <gallatin@cs.duke.edu>
To:        Paul Herman <pherman@frenchfries.net>
Cc:        imp@freebsd.org, freebsd-stable@freebsd.org
Subject:   ipl problem in wi_hostapp.c ? 
Message-ID:  <15593.4548.519462.433420@moe.cs.duke.edu>
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>

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

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




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