Bug in proc-fs (2.1.48), dcache related

Richard Guenther (richard.guenther@student.uni-tuebingen.de)
Sun, 10 Aug 1997 15:16:45 +0200 (MSZ)


Hi!

There is a problem with the proc filesystem. The proc_unregister function
(linux/fs/proc/root.c) does not remove an existing dentry, so if a proc file
with the same name is added back, it could use the wrong inode number, if
another file was added before. You can verify this using binfmt_misc:

# cd /proc/sys/fs/binfmt_misc
# echo :test1:M::test::/bin/echo: > register
# ls -i
4186 register 4185 status 4187 test1
# echo -1 > test1
# echo :test2:M::xxxx::/bin/echo: > register
# echo :test1:M::test::/bin/echo: > register
# ls -i
4186 register 4185 status 4187 test1 4187 test2

This is obviously not the correct behaviour.

Richard.