From owner-freebsd-net Wed Jun 7 13:58:48 2000 Delivered-To: freebsd-net@freebsd.org Received: from khavrinen.lcs.mit.edu (khavrinen.lcs.mit.edu [18.24.4.193]) by hub.freebsd.org (Postfix) with ESMTP id 8699A37B51F; Wed, 7 Jun 2000 13:58:44 -0700 (PDT) (envelope-from wollman@khavrinen.lcs.mit.edu) Received: (from wollman@localhost) by khavrinen.lcs.mit.edu (8.9.3/8.9.3) id QAA72060; Wed, 7 Jun 2000 16:58:41 -0400 (EDT) (envelope-from wollman) Date: Wed, 7 Jun 2000 16:58:41 -0400 (EDT) From: Garrett Wollman Message-Id: <200006072058.QAA72060@khavrinen.lcs.mit.edu> To: Bernd Walter Cc: "G.B.Naidu" , hackers@FreeBSD.ORG, net@FreeBSD.ORG Subject: Re: [REPOST] Re: How do I get port inside kernel.... (fwd) In-Reply-To: <20000607220906.A98783@cicely8.cicely.de> References: <20000607220906.A98783@cicely8.cicely.de> Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org < 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. -GAWollman To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message