[Top] [All Lists]

Re: file handling in kernel mode

To: Brad Parker <>
Subject: Re: file handling in kernel mode
From: Ralf Baechle <>
Date: Mon, 17 Nov 2003 02:06:32 +0100
Cc: durai <>,
In-reply-to: <>
Original-recipient: rfc822;
References: <> <>
User-agent: Mutt/1.4.1i
On Sun, Nov 16, 2003 at 07:46:35PM -0500, Brad Parker wrote:

> Shouldn't someone point out that having a driver read a file is 
> very, very wrong and a classic FAQ question?

It is.

> Perhaps I'm mistaken but this seems to come up once a year on every port
> list I'm on.

I think it's the first time on this list.  In my previous posting I suggested
request_firmware for 2.4.23 / 2.6.  For kernels older than this I suggest
arch/i386/kernel/microcode.c as an example for how to easily implement
a character special file.

> Resist the temptation to put code in the driver to access the file
> system.


> ps: isn't hotplug already setup to notice when a device comes up and to
> have a shell script run?  it's bad enough that the hotplug code runs a
> shell script from the kernel.  I can't believe that got through...
> (and if you have time, go read the plan 9 design docs.  then ask yourself
> what those guys would do :-)

2.6 certainly is quite a bit more plan 9-ish.  What would you expect from
Al Viro :-)


<Prev in Thread] Current Thread [Next in Thread>