From owner-cvs-src@FreeBSD.ORG Mon Jun 5 12:32:29 2006 Return-Path: X-Original-To: cvs-src@freebsd.org Delivered-To: cvs-src@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 474BB16A939; Mon, 5 Jun 2006 12:32:29 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from server.baldwin.cx (66-23-211-162.clients.speedfactory.net [66.23.211.162]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8B63C43D48; Mon, 5 Jun 2006 12:32:26 +0000 (GMT) (envelope-from jhb@freebsd.org) Received: from localhost.corp.yahoo.com (john@localhost [127.0.0.1]) (authenticated bits=0) by server.baldwin.cx (8.13.4/8.13.4) with ESMTP id k55CWHbn050647; Mon, 5 Jun 2006 08:32:22 -0400 (EDT) (envelope-from jhb@freebsd.org) From: John Baldwin To: Gleb Smirnoff Date: Mon, 5 Jun 2006 08:32:07 -0400 User-Agent: KMail/1.9.1 References: <200606022035.k52KZdM1024927@repoman.freebsd.org> <20060605073345.GU98544@FreeBSD.org> In-Reply-To: <20060605073345.GU98544@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset="koi8-r" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200606050832.09421.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH authentication, not delayed by milter-greylist-2.0.2 (server.baldwin.cx [127.0.0.1]); Mon, 05 Jun 2006 08:32:25 -0400 (EDT) X-Virus-Scanned: ClamAV 0.87.1/1512/Sun Jun 4 05:58:49 2006 on server.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-4.4 required=4.2 tests=ALL_TRUSTED,BAYES_00 autolearn=ham version=3.1.0 X-Spam-Checker-Version: SpamAssassin 3.1.0 (2005-09-13) on server.baldwin.cx Cc: sekes , src-committers@freebsd.org, julian@freebsd.org, cvs-all@freebsd.org, cvs-src@freebsd.org Subject: Re: cvs commit: src/sys/netgraph ng_base.c X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Jun 2006 12:32:55 -0000 On Monday 05 June 2006 03:33, Gleb Smirnoff wrote: > On Fri, Jun 02, 2006 at 08:35:39PM +0000, John Baldwin wrote: > J> jhb 2006-06-02 20:35:39 UTC > J> > J> FreeBSD src repository > J> > J> Modified files: > J> sys/netgraph ng_base.c > J> Log: > J> Conditionally acquire Giant in netgraph callouts to honor mpsafenet=0. > J> > J> Reported by: sekes > J> MFC after: 1 week > J> > J> Revision Changes Path > J> 1.123 +2 -0 src/sys/netgraph/ng_base.c > > I don't think this is best way to fix this. I'd suggest to back this > out and make this change: > > Index: netgraph.h > =================================================================== > RCS file: /home/ncvs/src/sys/netgraph/netgraph.h,v > retrieving revision 1.65 > diff -u -r1.65 netgraph.h > --- netgraph.h 12 Jan 2006 22:44:04 -0000 1.65 > +++ netgraph.h 5 Jun 2006 07:32:43 -0000 > @@ -1101,7 +1101,7 @@ > int ng_uncallout(struct callout *c, node_p node); > int ng_callout(struct callout *c, node_p node, hook_p hook, int ticks, > ng_item_fn *fn, void * arg1, int arg2); > -#define ng_callout_init(c) callout_init(c, CALLOUT_MPSAFE) > +#define ng_callout_init(c) callout_init(c, NET_CALLOUT_MPSAFE) > > /* Flags for netgraph functions. */ > #define NG_NOFLAGS 0x00000000 /* no special options */ > > If you don't object, I can backout and commit the above myself. Ok, didn't know that we had that flag. That won't work when mpsafenet changes to 0 mid-flight b/c one kldload's a non-mpsafe module though. :) Of course, we already don't support that because NET_LOCK_GIANT doesn't return a locked variable that is passed to NET_UNLOCK_GIANT like VFS_LOCK_GIANT does. -- John Baldwin