Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 4 Jun 2011 20:01:13 -0400 (EDT)
From:      Benjamin Kaduk <kaduk@MIT.EDU>
To:        Ali Mashtizadeh <mashtizadeh@gmail.com>
Cc:        FreeBSD Hackers <freebsd-hackers@freebsd.org>
Subject:   Re: Opening files from within geom filters
Message-ID:  <alpine.GSO.1.10.1106041956190.6818@multics.mit.edu>
In-Reply-To: <BANLkTimuJvMw2MRKiSLjD5erhyg_xE-w3Q@mail.gmail.com>
References:  <BANLkTimuJvMw2MRKiSLjD5erhyg_xE-w3Q@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?alpine.GSO.1.10.1106041956190.6818>