From owner-freebsd-hackers Wed Jun 7 14:35:30 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from mail.cicely.de (cicely.de [194.231.9.142]) by hub.freebsd.org (Postfix) with ESMTP id 684E437B8BE; Wed, 7 Jun 2000 14:35:17 -0700 (PDT) (envelope-from ticso@cicely8.cicely.de) Received: from cicely8.cicely.de (cicely8.cicely.de [10.1.2.10]) by mail.cicely.de (8.11.0.Beta1/8.11.0.Beta1) with ESMTP id e57LZ2C31008; Wed, 7 Jun 2000 23:35:02 +0200 (CEST) Received: (from ticso@localhost) by cicely8.cicely.de (8.9.3/8.9.2) id XAA98964; Wed, 7 Jun 2000 23:34:58 +0200 (CEST) (envelope-from ticso) Date: Wed, 7 Jun 2000 23:34:57 +0200 From: Bernd Walter To: Garrett Wollman Cc: "G.B.Naidu" , hackers@FreeBSD.ORG, net@FreeBSD.ORG Subject: Re: [REPOST] Re: How do I get port inside kernel.... (fwd) Message-ID: <20000607233457.B98783@cicely8.cicely.de> References: <20000607220906.A98783@cicely8.cicely.de> <200006072058.QAA72060@khavrinen.lcs.mit.edu> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0.1i In-Reply-To: <200006072058.QAA72060@khavrinen.lcs.mit.edu>; from wollman@khavrinen.lcs.mit.edu on Wed, Jun 07, 2000 at 04:58:41PM -0400 Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Wed, Jun 07, 2000 at 04:58:41PM -0400, Garrett Wollman wrote: > < said: > > >> current process? Is it safe if I use proc0 to pass the proc structure to > >> call socreate() and sobind()? How safe it is to use curproc > >> structure? Somebody mentioned that it will not work in interrupt > >> handlers. > > proc0 is passed because I didn't think things completely through when > the socket layer was taught not to accept process arguments. In most > if not all cases the process parameter should be passed as nil, > rather than &proc0, because the code uses this value to determine > whether or not it is safe to sleep. Some of the code, however, is > buggy in that it does not check for a null process pointer and > proceeds to dereference it. Mmmhh - that also means that it is not valid to use proc0 within an upcall function because it may sleep :( Are the fuctions using the same table with proc0 as with nil or must all calls use the same value? -- B.Walter COSMO-Project http://www.cosmo-project.de ticso@cicely.de Usergroup info@cosmo-project.de To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message