Re: Acceptable kernel code?

H. Peter Anvin (
6 May 1997 16:42:58 GMT

Followup to: <>
By author: "James R. Leu" <>
In newsgroup:

> Is it acceptable to use functions like gethostbyname() inside of the kernel?


> Normally a userland function call should stay in userland, right?
> Well what about in a thread like nfsiod? It is kind of in userland
> (it's a process) and kind of in kernel land.

Not so, it is a process in kernel mode. It is 100% kernel code.

> What is the general rule of thumb for this?

Not a rule of thumb, a commandment: DON'T EVEN TRY. This is part of
the reason why autofs is implemented partially in the kernel and
partially in user space, so the user space daemon can take care of
this kind of business whereas the kernel code is there for speed.


Always looking for a few good BOsFH.  **  Linux - the OS of global cooperation
        I am Baha'i -- ask me about it or see