Date: Fri, 20 Aug 2004 11:15:49 +0200 From: Stefan Farfeleder <stefan@fafoe.narf.at> To: Robert Watson <rwatson@freebsd.org> Cc: current@freebsd.org Subject: Re: HEADSUP: acpi mpsafe committed Message-ID: <20040820091545.GA549@wombat.fafoe.narf.at> In-Reply-To: <20040817123623.GA622@wombat.fafoe.narf.at> References: <4120F26B.1040808@root.org> <Pine.NEB.3.96L.1040816143239.82126A-100000@fledge.watson.org> <20040817123623.GA622@wombat.fafoe.narf.at>
next in thread | previous in thread | raw e-mail | index | archive | help
--gE7i1rD7pdK0Ng3j Content-Type: text/plain; charset=us-ascii Content-Disposition: inline [acpi Cc's dropped] On Tue, Aug 17, 2004 at 02:36:26PM +0200, Stefan Farfeleder wrote: > I have no idea why, but suspending suddenly works again with a new > kernel. Sorry for the noise. Duh, that's because I built wi and wlan as modules, which effectively disabled INVARIANTS. With both of them in the kernel again, the assertion is still triggered. Robert's proposed change leads to a LOR but works fine otherwise. Cheers, Stefan --gE7i1rD7pdK0Ng3j Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="if_wi-giant.diff" Index: src/sys/dev/wi/if_wi.c =================================================================== RCS file: /home/ncvs/src/sys/dev/wi/if_wi.c,v retrieving revision 1.168 diff -I.svn -u -r1.168 if_wi.c --- src/sys/dev/wi/if_wi.c 1 Aug 2004 23:58:04 -0000 1.168 +++ src/sys/dev/wi/if_wi.c 20 Aug 2004 09:03:57 -0000 @@ -2643,6 +2643,7 @@ u_int16_t val; struct wi_ssid ssid; u_int8_t old_bssid[IEEE80211_ADDR_LEN]; + int err; DPRINTF(("%s: %s -> %s\n", __func__, ieee80211_state_name[ic->ic_state], @@ -2652,7 +2653,10 @@ case IEEE80211_S_INIT: ic->ic_flags &= ~IEEE80211_F_SIBSS; sc->sc_flags &= ~WI_FLAGS_OUTRANGE; - return (*sc->sc_newstate)(ic, nstate, arg); + NET_LOCK_GIANT(); + err = (*sc->sc_newstate)(ic, nstate, arg); + NET_UNLOCK_GIANT(); + return (err); case IEEE80211_S_RUN: sc->sc_flags &= ~WI_FLAGS_OUTRANGE; --gE7i1rD7pdK0Ng3j Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="if_wi-lor.txt" lock order reversal 1st 0xc1ee7c44 wi0 (network driver) @ /usr/home/stefan/freebsd/src/sys/dev/wi/if_wi.c:824 2nd 0xc0710680 Giant (Giant) @ /usr/home/stefan/freebsd/src/sys/dev/wi/if_wi.c:2656 KDB: stack backtrace: kdb_backtrace(c06b4177,c0710680,c06c74eb,c06c74eb,c06a92f5) at kdb_backtrace+0x2f witness_checkorder(c0710680,9,c06a92f5,a60,1) at witness_checkorder+0x6b6 _mtx_lock_flags(c0710680,0,c06a92f5,a60,c1ee6500) at _mtx_lock_flags+0x85 wi_newstate(c1ee7000,0,ffffffff,338,c06d9160) at wi_newstate+0xa8 wi_stop(c1ee7000,1,de11eb4c,c04f25de,c1ed8d00) at wi_stop+0x5c wi_pci_suspend(c1ed8d00,c1e8702c,c06d9160,c1f11cb8,c1ed8980) at wi_pci_suspend+0x21 bus_generic_suspend(c1ee2300,c06e63c0,0,c1f11c10,3) at bus_generic_suspend+0x53 pci_suspend(c1ee2300,c1ed8280,de11eb98,c04f645a,c1ee2a00) at pci_suspend+0x72 bus_generic_suspend(c1ee2a00,c1e8782c,c06d9160,c20b7ef8,c1ee2500) at bus_generic_suspend+0x53 bus_generic_suspend(c1ed8180,c06e63c0,0,c20b7a80,b) at bus_generic_suspend+0x53 pci_suspend(c1ed8180,c1e8882c,c06d9160,c04f645a,c1ed0100) at pci_suspend+0x72 bus_generic_suspend(c1ed0100,c1e8802c,c06d9160,c04f645a,c1df6900) at bus_generic_suspend+0x53 bus_generic_suspend(c1df6900,c1e8a82c,c06d9160,c04f645a,c1df6b00) at bus_generic_suspend+0x53 bus_generic_suspend(c1df6b00,c1e7502c,c06d9160,c04f645a,c1e5a300) at bus_generic_suspend+0x53 bus_generic_suspend(c1e5a300,c1e5c02c,c06d9160,6d8,1) at bus_generic_suspend+0x53 acpi_SetSleepState(c1df6880,3,de11ecd8,c081de6b,c1df6880) at acpi_SetSleepState+0x191 acpi_system_eventhandler_sleep(c1df6880,3,c0833188,8a3,c1df6880) at acpi_system_eventhandler_sleep+0x1e acpi_event_sleep_button_sleep(c1df6880,c1dec3c0,1,c1ecfc60,c1ed1e00) at acpi_event_sleep_button_sleep+0xb5 acpi_button_notify_sleep(c1ecf710,0,c083587d,6d,0) at acpi_button_notify_sleep+0xb3 acpi_task_thread(0,de11ed48,c06adea9,32c,0) at acpi_task_thread+0xbd fork_exit(c082ae03,0,de11ed48) at fork_exit+0xc7 fork_trampoline() at fork_trampoline+0x8 --- trap 0x1, eip = 0, esp = 0xde11ed7c, ebp = 0 --- --gE7i1rD7pdK0Ng3j--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20040820091545.GA549>