From owner-freebsd-hackers@FreeBSD.ORG Tue Aug 4 17:20:57 2009 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E4D8710656AB for ; Tue, 4 Aug 2009 17:20:57 +0000 (UTC) (envelope-from julian@elischer.org) Received: from outL.internet-mail-service.net (outl.internet-mail-service.net [216.240.47.235]) by mx1.freebsd.org (Postfix) with ESMTP id C5E6D8FC1A for ; Tue, 4 Aug 2009 17:20:57 +0000 (UTC) (envelope-from julian@elischer.org) Received: from idiom.com (mx0.idiom.com [216.240.32.160]) by out.internet-mail-service.net (Postfix) with ESMTP id D333B961D8; Tue, 4 Aug 2009 10:20:57 -0700 (PDT) X-Client-Authorized: MaGic Cook1e X-Client-Authorized: MaGic Cook1e X-Client-Authorized: MaGic Cook1e Received: from julian-mac.elischer.org (home.elischer.org [216.240.48.38]) by idiom.com (Postfix) with ESMTP id 0F8172D601A; Tue, 4 Aug 2009 10:20:57 -0700 (PDT) Message-ID: <4A786E0C.8020201@elischer.org> Date: Tue, 04 Aug 2009 10:21:16 -0700 From: Julian Elischer User-Agent: Thunderbird 2.0.0.22 (Macintosh/20090605) MIME-Version: 1.0 To: Maslan References: <319cceca0908030119i3432a495ya60aa431dab0e1b1@mail.gmail.com> <86k51k4kvl.fsf@ds4.des.no> <86fxc84ksj.fsf@ds4.des.no> <200908040138.14743.max@love2party.net> <319cceca0908040227hf9a0f92jbf05b11e9f974994@mail.gmail.com> <20090804093036.GN1292@hoeg.nl> <319cceca0908040239k2accd7fen402db4c91687a267@mail.gmail.com> <4A786302.3090709@elischer.org> <319cceca0908041003o4c313bf6qff57a1f0b752b537@mail.gmail.com> <319cceca0908041008p2de4452duc55467abbb121e16@mail.gmail.com> In-Reply-To: <319cceca0908041008p2de4452duc55467abbb121e16@mail.gmail.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Ed Schouten , FreeBSD Hackers Subject: Re: sosend() and mbuf X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 04 Aug 2009 17:20:58 -0000 Maslan wrote: > Guys, > > Here is the code, just scroll down and change kthread_create2() to > kthread_create() and it will crash > > NOTE: i'm still working on the socket part, u can commend it. > > Something wrong with proc0, and I can't figure it out > > > ------------------------------------------------------------------------ > > _______________________________________________ > freebsd-hackers@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-hackers > To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org" The problem is that you are NOT on proc0 You have created your own kernel process and is DOES NOT have a file descriptor table. in 8.x this is all changed. using kthread_create2 creates a kernel thread attached to YOUR USER PROCESS. and YOU DO have a file descriptor table, as does proc0 as a special case of kernel process.