From owner-freebsd-net Mon Jan 21 10:20:46 2002 Delivered-To: freebsd-net@freebsd.org Received: from wall.polstra.com (wall-gw.polstra.com [206.213.73.130]) by hub.freebsd.org (Postfix) with ESMTP id 9799F37B416 for ; Mon, 21 Jan 2002 10:20:43 -0800 (PST) Received: from vashon.polstra.com (vashon.polstra.com [206.213.73.13]) by wall.polstra.com (8.11.3/8.11.3) with ESMTP id g0LIKe243883; Mon, 21 Jan 2002 10:20:40 -0800 (PST) (envelope-from jdp@wall.polstra.com) Received: (from jdp@localhost) by vashon.polstra.com (8.11.6/8.11.0) id g0LIKeZ93986; Mon, 21 Jan 2002 10:20:40 -0800 (PST) (envelope-from jdp) Date: Mon, 21 Jan 2002 10:20:40 -0800 (PST) Message-Id: <200201211820.g0LIKeZ93986@vashon.polstra.com> To: net@freebsd.org From: John Polstra Cc: wollman@khavrinen.lcs.mit.edu Subject: Re: netgraph: how to setsockopt on ksocket node ? In-Reply-To: <200201202329.g0KNTLO33136@khavrinen.lcs.mit.edu> References: <135740000.1011562445@blues.viagenie.qc.ca> <200201202308.g0KN8uc09321@arch20m.dellroad.org> <200201202329.g0KNTLO33136@khavrinen.lcs.mit.edu> Organization: Polstra & Co., Seattle, WA Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org In article <200201202329.g0KNTLO33136@khavrinen.lcs.mit.edu>, Garrett Wollman wrote: > < said: > > > But it's interesting the soalloc() is called with 'p != 0' > > as an argument. p is never 0 or else you would have already > > panic'd... you'd panic later on, too, referencing 'p->p_ucred'. > > All of the credential frobbing stuff was added much later. I agree with you -- the credential code broke it. > At the time I wrote that `p != 0', it was definitely possible for > socreate() to be called from interrupt context, and thus without any > idea of a `current process'. I have also used this in a project where I lifted the whole TCP/IP stack from FreeBSD and used it in an embedded environment. It's a very handy thing to be able to do, and I wouldn't like to see it remain broken. John -- John Polstra John D. Polstra & Co., Inc. Seattle, Washington USA "Disappointment is a good sign of basic intelligence." -- Chögyam Trungpa To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message