From owner-p4-projects@FreeBSD.ORG Wed Aug 10 22:46:45 2005 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id AC8E916A422; Wed, 10 Aug 2005 22:46:43 +0000 (GMT) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A65CC16A421 for ; Wed, 10 Aug 2005 22:46:41 +0000 (GMT) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 117B643DE2 for ; Wed, 10 Aug 2005 22:38:02 +0000 (GMT) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id j7AMc1bp070598 for ; Wed, 10 Aug 2005 22:38:01 GMT (envelope-from sam@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id j7AMc1rt070595 for perforce@freebsd.org; Wed, 10 Aug 2005 22:38:01 GMT (envelope-from sam@freebsd.org) Date: Wed, 10 Aug 2005 22:38:01 GMT Message-Id: <200508102238.j7AMc1rt070595@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to sam@freebsd.org using -f From: Sam Leffler To: Perforce Change Reviews Cc: Subject: PERFORCE change 81809 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Aug 2005 22:46:46 -0000 http://perforce.freebsd.org/chv.cgi?CH=81809 Change 81809 by sam@sam_ebb on 2005/08/10 22:37:39 Bandaid deadlock: on tx timeout we're in the callout callback when we clock the state machine, but this results in a call to callout_drain which blocks because the callout is active. Workaround for now is to use callout_stop which won't block but this potentially leaves us open to a race. Affected files ... .. //depot/projects/wifi/sys/net80211/ieee80211_proto.c#36 edit Differences ... ==== //depot/projects/wifi/sys/net80211/ieee80211_proto.c#36 (text+ko) ==== @@ -31,7 +31,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/net80211/ieee80211_proto.c,v 1.22 2005/07/22 21:11:26 sam Exp $"); +__FBSDID("$FreeBSD: src/sys/net80211/ieee80211_proto.c,v 1.23 2005/08/10 16:22:29 sam Exp $"); /* * IEEE 802.11 protocol support. @@ -949,7 +949,7 @@ IEEE80211_DPRINTF(ic, IEEE80211_MSG_STATE, "%s: %s -> %s\n", __func__, ieee80211_state_name[ostate], ieee80211_state_name[nstate]); ic->ic_state = nstate; /* state transition */ - callout_drain(&ic->ic_mgtsend); + callout_stop(&ic->ic_mgtsend); /* XXX callout_drain */ if (ostate != IEEE80211_S_SCAN) ieee80211_cancel_scan(ic); /* background scan */ ni = ic->ic_bss; /* NB: no reference held */