From owner-freebsd-hackers@FreeBSD.ORG Sun Jun 5 00:01:17 2011 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 185D9106566B for ; Sun, 5 Jun 2011 00:01:17 +0000 (UTC) (envelope-from kaduk@mit.edu) Received: from dmz-mailsec-scanner-1.mit.edu (DMZ-MAILSEC-SCANNER-1.MIT.EDU [18.9.25.12]) by mx1.freebsd.org (Postfix) with ESMTP id C125B8FC12 for ; Sun, 5 Jun 2011 00:01:16 +0000 (UTC) X-AuditID: 1209190c-b7c65ae00000117c-3a-4deac753a8ff Received: from mailhub-auth-2.mit.edu ( [18.7.62.36]) by dmz-mailsec-scanner-1.mit.edu (Symantec Messaging Gateway) with SMTP id 37.56.04476.357CAED4; Sat, 4 Jun 2011 20:01:23 -0400 (EDT) Received: from outgoing.mit.edu (OUTGOING-AUTH.MIT.EDU [18.7.22.103]) by mailhub-auth-2.mit.edu (8.13.8/8.9.2) with ESMTP id p5501FNV008816; Sat, 4 Jun 2011 20:01:15 -0400 Received: from multics.mit.edu (MULTICS.MIT.EDU [18.187.1.73]) (authenticated bits=56) (User authenticated as kaduk@ATHENA.MIT.EDU) by outgoing.mit.edu (8.13.6/8.12.4) with ESMTP id p5501DPb018592 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Sat, 4 Jun 2011 20:01:15 -0400 (EDT) Received: (from kaduk@localhost) by multics.mit.edu (8.12.9.20060308) id p5501DqC004504; Sat, 4 Jun 2011 20:01:13 -0400 (EDT) Date: Sat, 4 Jun 2011 20:01:13 -0400 (EDT) From: Benjamin Kaduk To: Ali Mashtizadeh In-Reply-To: Message-ID: References: User-Agent: Alpine 1.10 (GSO 962 2008-03-14) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; format=flowed; charset=US-ASCII X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFnrNIsWRmVeSWpSXmKPExsUixG6noht8/JWvwatmLovtm/8xWlzd7e7A 5DHj03wWj52z7rIHMEVx2aSk5mSWpRbp2yVwZaw/+pS1YA1rxcFNDewNjEtZuhg5OSQETCRO /pjCDmGLSVy4t56ti5GLQ0hgH6NE977z7BDOekaJPetnQGX2M0l8mPuQDaRFSKBe4s2MS2Dt LAJaEh/nH2cCsdkEVCRmvtkIViMioC3x781ToBoODmYBQ4lzG/xBwsICxhKb1uwBK+EUcJRY 3fwIzOYVcJCYOusFK8R4B4mJl7eAXSoqoCOxev8UFogaQYmTM5+A2cwClhL/1v5incAoOAtJ ahaS1AJGplWMsim5Vbq5iZk5xanJusXJiXl5qUW6hnq5mSV6qSmlmxhBYcopybOD8c1BpUOM AhyMSjy8dkmvfIVYE8uKK3MPMUpyMCmJ8r46BhTiS8pPqcxILM6ILyrNSS0+xCjBwawkwlsn ApTjTUmsrEotyodJSXOwKInzzpBU9xUSSE8sSc1OTS1ILYLJynBwKEnwVoAMFSxKTU+tSMvM KUFIM3FwggznARq+BqSGt7ggMbc4Mx0if4pRUUqc9z1IQgAkkVGaB9cLSyOvGMWBXhHmXQtS xQNMQXDdr4AGMwENPu4ENrgkESEl1cBo/m1+xWUr7z+BX7ZNOvzD6HTNzuenFjTE2vSHr6pJ lrXe8scgd9LHbT/EtLzufTez/L3mdd6EiATZxq+h+dJTqo+bh4koqt890MB14e3u079lNpl0 sTXPVfp2KlV7z17+qhtPXl12uTm9Tb/OWLZkelHQR3VO/2Sznx0hzSrLmxftvuvZm92pxFKc kWioxVxUnAgA/pvqWP4CAAA= Cc: FreeBSD Hackers Subject: Re: Opening files from within geom filters 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: Sun, 05 Jun 2011 00:01:17 -0000 On Sat, 4 Jun 2011, Ali Mashtizadeh wrote: > Hi Folks, > > I'm working on a small geom filter where I need to open a file with > vn_open_cred, but this causes an assert because of a null pointer > because g_run_event proc structure has null pointer for the current > working directory. Hi Ali, In general, it is not recommended to open a file from within the kernel, due to a multitude of complications and difficulties. The old thread here: http://lists.freebsd.org/pipermail/freebsd-hackers/2007-May/020544.html may provide you with some other options to do what you're doing, and insight from a previous time when this sort of question came up. -Ben Kaduk