Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 2 Jul 2005 12:12:04 +0200
From:      Seb <sebastien.b@swissinfo.org>
To:        freebsd-hackers@freebsd.org
Subject:   Re: Accessing filesystem from a KLD
Message-ID:  <200507021212.05048.sebastien.b@swissinfo.org>
In-Reply-To: <20050629134029.GA220@pm514-9.comsys.ntu-kpi.kiev.ua>
References:  <200506251203.13569.sebastien.b@swissinfo.org> <200506291155.50929.sebastien.b@swissinfo.org> <20050629134029.GA220@pm514-9.comsys.ntu-kpi.kiev.ua>

next in thread | previous in thread | raw e-mail | index | archive | help
Andrey Simonenko wrote=A0:
> You got page fault from namei(), which is called from vn_open() to lookup
> a path name.  namei() tries to obtain a reference on current directory for
> the current thread.  This current directory (fd_cdir field) is NULL in
> your kthread.  At this point a page fault in kernel address space is
> generated.

You were right :) It works now.

> Can you change fd_cdir in kthread to rootvnode I don't know, haven't
> checked this yet. =20

It works - and that's what NDISulator does. You also need to set fd_rdir.

Thanks !

Mike Silbersack wrote :
> Ask damien.bergamini@free.fr for his code that does exactly what you're=20
> asking for. :)

I've looked at Damien's source, but AFAIK in his driver, the firmware is=20
loaded from userspace through an ioctl call on the network interface.




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200507021212.05048.sebastien.b>