From owner-freebsd-net@FreeBSD.ORG Tue Nov 10 22:49:08 2009 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 37391106566B for ; Tue, 10 Nov 2009 22:49:08 +0000 (UTC) (envelope-from gavin@freebsd.org) Received: from mail-gw1.york.ac.uk (mail-gw1.york.ac.uk [144.32.128.246]) by mx1.freebsd.org (Postfix) with ESMTP id C484C8FC13 for ; Tue, 10 Nov 2009 22:49:07 +0000 (UTC) Received: from mail-gw7.york.ac.uk (mail-gw7.york.ac.uk [144.32.129.30]) by mail-gw1.york.ac.uk (8.13.6/8.13.6) with ESMTP id nAAMHiJ2016161; Tue, 10 Nov 2009 22:17:44 GMT Received: from ury.york.ac.uk ([144.32.108.81]) by mail-gw7.york.ac.uk with esmtps (TLSv1:AES256-SHA:256) (Exim 4.68) (envelope-from ) id 1N7z20-0003WC-6b; Tue, 10 Nov 2009 22:17:44 +0000 Received: from ury.york.ac.uk (localhost.york.ac.uk [127.0.0.1]) by ury.york.ac.uk (8.14.3/8.14.3) with ESMTP id nAAMHidl007303; Tue, 10 Nov 2009 22:17:44 GMT (envelope-from gavin@freebsd.org) Received: from localhost (gavin@localhost) by ury.york.ac.uk (8.14.3/8.14.3/Submit) with ESMTP id nAAMHiJ8007300; Tue, 10 Nov 2009 22:17:44 GMT (envelope-from gavin@freebsd.org) X-Authentication-Warning: ury.york.ac.uk: gavin owned process doing -bs Date: Tue, 10 Nov 2009 22:17:44 +0000 (GMT) From: Gavin Atkinson X-X-Sender: gavin@ury.york.ac.uk To: John Baldwin In-Reply-To: <200911101702.57525.jhb@freebsd.org> Message-ID: <20091110221339.Y61601@ury.york.ac.uk> References: <200911061508.22482.jhb@freebsd.org> <20091110194048.D61601@ury.york.ac.uk> <200911101702.57525.jhb@freebsd.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-York-MailScanner: Found to be clean X-York-MailScanner-From: gavin@freebsd.org Cc: freebsd-net@freebsd.org, freebsd-current@freebsd.org Subject: Re: [PATCH] Remove if_watchdog use X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Nov 2009 22:49:08 -0000 On Tue, 10 Nov 2009, John Baldwin wrote: > On Tuesday 10 November 2009 4:45:03 pm Gavin Atkinson wrote: >> I managed to get a panic when running wpa_supplicant: >> >> System call ioctl returning with the following locks held: >> exclusive sleep mutex an0 (network driver) r=0 (0xc58fc180) locked @ >> /usr/src/sys/dev/an/if_an.c:2341 >> panic: witness_warn >> >> This seems to fix that: >> >> --- /usr/src/sys/dev/an/if_an.c.orig 2009-11-10 19:26:21.000000000 >> +0000 >> +++ /usr/src/sys/dev/an/if_an.c 2009-11-10 19:27:24.000000000 +0000 >> @@ -2570,6 +2570,9 @@ >> an_setdef(sc, &sc->areq); >> AN_UNLOCK(sc); >> break; >> + default: >> + AN_UNLOCK(sc); >> + break; >> } >> >> /* > > Ok, thanks. Sadly the ioctl handling probably needs a bit more work since it > calls copyin() while holding the an(4) mutex, but I will leave that for > another day. It actually appears that the above panic is not something that has been introduced with your patch - I can reproduce it on a vanilla system. The above patch fixes it in the original code too. Gavin