over writing a device file when module not loaded.

Robert of the Linux (robert@athena.rutgers.edu)
Tue, 25 Jul 1995 15:30:54 +1000 (EST)


The other night, i decided to do a backup to my tape device.
I use a tape backup connected to the FDC. and thus i use the device
driver ftape, which is a kernel module. I forgot to load ftape before
starting the backup (kerneld will fix this oversight of mine :-).
Anyway, the tape did nothing of course, but the harddrive seemed very
busy considering nothing else was really happening on the system. I
realised what i had done and stopped the backup. I noticed the filesystem
had filled up quite a bit, so i had a look in /dev. There the file
/dev/rft0 (my tape device) was several Mb in size. Without the ftape
module in memory tar had over written /dev/rft0 and just wrote the tar
file to the file /dev/rft0. I had to delete the file and mknod the
device again. I think the kernel should realise that device files are
still device files rather than normal files even if the module isn't
in memory. Here is my rft0 device:

crw-rw-rw- 1 root root 27, 0 Jul 23 21:15 /dev/rft0

I use kernel 1.2.11.
-Robert

--Robert Brockway, email: ec531667@student.uq.edu.au
WWW: http://student.uq.edu.au/~ec531667
snail mail: never mind.
"Since the dodecahedron has 12 faces, it makes an ideal desk calendar."
Gary Chartrand and Ortrud R. Oellermann, Applied and Algorithmic Graph Theory.