From owner-freebsd-current@FreeBSD.ORG Tue May 19 05:11:53 2009 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 927F510656A7 for ; Tue, 19 May 2009 05:11:53 +0000 (UTC) (envelope-from weongyo.jeong@gmail.com) Received: from rv-out-0506.google.com (rv-out-0506.google.com [209.85.198.235]) by mx1.freebsd.org (Postfix) with ESMTP id 558AF8FC2F for ; Tue, 19 May 2009 05:11:53 +0000 (UTC) (envelope-from weongyo.jeong@gmail.com) Received: by rv-out-0506.google.com with SMTP id k40so2086949rvb.43 for ; Mon, 18 May 2009 22:11:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:received:from:date:to:cc :subject:message-id:reply-to:mail-followup-to:references :mime-version:content-type:content-disposition:in-reply-to :user-agent:organization:x-operation-sytem; bh=TTQK5ec0rMYgfz0H9XDpWDMtkEUGqQ6S2TCc0Qa+xqI=; b=XcTdyf/YHda0vjAdnzm0SBuFxSHIs5an5KvytfePimMq/6qcjZ5PyLpHxv1PWYPzC2 xPR/9X2TEViCKLEa7WgasHv51Csgv0N3bcknCJaXtQYG5D1TS9K40Dh7HBLkKcSjb+Yb TM9hgMpDB/qmFa4QKYJK/WOHkWfc7O8C6DM0Q= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:date:to:cc:subject:message-id:reply-to:mail-followup-to :references:mime-version:content-type:content-disposition :in-reply-to:user-agent:organization:x-operation-sytem; b=sOsz+yTzit0sF8OKAsTaaH0AcM+VhBkQH8qsxFiKTrMyaYFuXidOFttRwbeAOuyc+H bBNiQicKGkOTtMCiT5SKQega9597N7bSG6OIw/o13wMOjv+FWy3VyoXc/9eA19YYAJYm 1DU7xz5zU4oDxEThWfHphCQsWyXdp1WNlWWGA= Received: by 10.141.43.19 with SMTP id v19mr2744432rvj.226.1242708586546; Mon, 18 May 2009 21:49:46 -0700 (PDT) Received: from weongyo ([114.111.62.249]) by mx.google.com with ESMTPS id b8sm15088017rvf.4.2009.05.18.21.49.44 (version=SSLv3 cipher=RC4-MD5); Mon, 18 May 2009 21:49:46 -0700 (PDT) Received: by weongyo (sSMTP sendmail emulation); Tue, 19 May 2009 13:49:41 +0900 From: Weongyo Jeong Date: Tue, 19 May 2009 13:49:41 +0900 To: Lucius Windschuh Message-ID: <20090519044941.GC42412@weongyo.cdnetworks.kr> Mail-Followup-To: Lucius Windschuh , freebsd-current@freebsd.org, Hans Petter Selasky References: <90a5caac0905171354k6e7c008eye18bd69aa543eaa6@mail.gmail.com> <200905181050.03154.hselasky@c2i.net> <90a5caac0905181508m7024377as8d70c89694a21e26@mail.gmail.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="BXVAT5kNtrzKuDFl" Content-Disposition: inline In-Reply-To: <90a5caac0905181508m7024377as8d70c89694a21e26@mail.gmail.com> User-Agent: Mutt/1.4.2.3i Organization: CDNetworks. X-Operation-Sytem: FreeBSD Cc: freebsd-current@freebsd.org, Hans Petter Selasky Subject: Re: Panics and potential memory corruption when pulling out a uath device X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Weongyo Jeong List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 May 2009 05:11:54 -0000 --BXVAT5kNtrzKuDFl Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Tue, May 19, 2009 at 12:08:45AM +0200, Lucius Windschuh wrote: > 2009/5/18 Hans Petter Selasky : > > Regarding the first panic, there seems to be a detach race in both upgt and > > uath, which is not USB related. Try this patch: > > > > http://perforce.freebsd.org/chv.cgi?CH=162250 > > This fixes not only the first panic. > I can't provoke any panic by pulling out the active device. Thanks. Could you please test with this patch that is slightly different with Hans's patch? It try to unsetup after stopping the device. If no problems I'd commit it. regards, Weongyo Jeong --BXVAT5kNtrzKuDFl Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="patch_uath_20090519.diff" Index: if_uath.c =================================================================== --- if_uath.c (revision 192368) +++ if_uath.c (working copy) @@ -517,12 +517,12 @@ sc->sc_flags |= UATH_FLAG_INVALID; uath_stop(ifp); - ieee80211_ifdetach(ic); callout_drain(&sc->stat_ch); callout_drain(&sc->watchdog_ch); usb2_transfer_unsetup(sc->sc_xfer, UATH_N_XFERS); + ieee80211_ifdetach(ic); /* free buffers */ UATH_LOCK(sc); --BXVAT5kNtrzKuDFl--