Opening files from within geom filters

Benjamin Kaduk kaduk at MIT.EDU
Sun Jun 5 00:01:17 UTC 2011


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


More information about the freebsd-hackers mailing list