From owner-freebsd-bugs@FreeBSD.ORG Tue Dec 4 16:44:04 2007 Return-Path: Delivered-To: freebsd-bugs@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2CD6C16A419 for ; Tue, 4 Dec 2007 16:44:04 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from cyrus.watson.org (cyrus.watson.org [209.31.154.42]) by mx1.freebsd.org (Postfix) with ESMTP id EBA0213C474 for ; Tue, 4 Dec 2007 16:44:03 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from fledge.watson.org (fledge.watson.org [209.31.154.41]) by cyrus.watson.org (Postfix) with ESMTP id EFD1346CBC; Tue, 4 Dec 2007 11:31:24 -0500 (EST) Date: Tue, 4 Dec 2007 16:26:26 +0000 (GMT) From: Robert Watson X-X-Sender: robert@fledge.watson.org To: Dan Lukes In-Reply-To: <200709022226.l82MQlSu002155@kulesh.obluda.cz> Message-ID: <20071204162537.F87930@fledge.watson.org> References: <200709022226.l82MQlSu002155@kulesh.obluda.cz> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: freebsd-bugs@FreeBSD.org, FreeBSD-gnats-submit@FreeBSD.org Subject: Re: kern/116034: Giant not owned at /usr/src/sys/netinet/tcp_sack.c:271=tcp_clean_sackreport(tp) X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 04 Dec 2007 16:44:04 -0000 On Mon, 3 Sep 2007, Dan Lukes wrote: > add NET_LOCK_GIANT() / NET_UNLOCK_GIANT() into tcp_drain() unless someone > smarter than me claim that Giant is NOT required here There's actually a slightly more general problem here--could you try this more general patch? I've requested to merge this to 6.3. Robert N M Watson Computer Laboratory University of Cambridge Index: kern_mbuf.c =================================================================== RCS file: /home/ncvs/src/sys/kern/kern_mbuf.c,v retrieving revision 1.9.2.9 diff -u -r1.9.2.9 kern_mbuf.c --- kern_mbuf.c 11 Feb 2007 03:31:18 -0000 1.9.2.9 +++ kern_mbuf.c 4 Dec 2007 15:53:52 -0000 @@ -550,9 +550,11 @@ WITNESS_WARN(WARN_GIANTOK | WARN_SLEEPOK | WARN_PANIC, NULL, "mb_reclaim()"); + NET_LOCK_GIANT(); mbstat.m_drain++; for (dp = domains; dp != NULL; dp = dp->dom_next) for (pr = dp->dom_protosw; pr < dp->dom_protoswNPROTOSW; pr++) if (pr->pr_drain != NULL) (*pr->pr_drain)(); + NET_UNLOCK_GIANT(); }